The win gave Germany top spot in Group D and a showdown with Fabio Capello’s England in Bloemfontein on Sunday while Ghana face Group C winners the USA in Rustenburg on Saturday.
Oezil’s superb strike from the edge of the penalty area on the hour mark proved decisive while Australia’s 2-1 win over Serbia in the other Group D match was academic.
For the first time in World Cup history, two brothers lined up against each other as Manchester City’s new signing Jerome Boateng came it at left-back for Germany to face elder half-brother Kevin-Prince Boateng of Ghana.
Brazilian-born striker Cacau, who started for the suspended Miroslav Klose, had the game’s first chance when he was freed on the right wing, but fired straight at Ghana goalkeeper Richard Kingson.
Ghana had a chance after 15 minutes when Kwadwo Asamoah played the ball into the box for Asamoah Gyan, but Bastian Schweinsteiger stepped in to snuff out the attack.
Both teams had clear chances around the 25 minute mark in a frantic period in front of a 83,391-strong crowd at Soccer City.
First Ghana’s Andre Ayew broke free into penalty area, but took one touch too many, then Germany’s Oezil went one-on-one with Kingson only for the Ghana goalkeeper to make the save.
Germany captain Philipp Lahm then saved a Gyan header off the line.
Ayew picked up the first booking on 39 minutes for a tackle from behind on Cacau, while Germany’s Thomas Mueller was also booked on 43 minutes for a clumsy tackle on 43 minutes.
Germany spent the first five minutes after the break in the Ghana half, but Asamoah squandered a golden chance to take the lead when he fired at German goalkeeper Manuel Neuer who managed to get a glove to the shot on 52 minutes.
With an hour gone, Oezil calmed Germany’s nerves with a left-footed goal from the edge of the penalty area which finally beat Kingson to give his side the lead.
Ghana then poured forward and a shot by John Pantsil was blocked by Jerome Boateng less than a minute later, while Lahm pulled off a goal-saving block on an Ayew shot which was headed goal bound moments later.
The last 20 minutes were a tense affair as Ghana constantly tested the German defence, but Joachim Loew’s team held firm to maintain their country’s record of having never failed to qualify from the group stages at a World Cup.