Goals from Petit, Lukas Podolski and a late brace from Milivoje Novakovic ended Hannover's run of three straight Bundesliga victories and dented their Champions League ambitions.
Victory would have sent the visitors second in the table. Instead they could be just two points ahead of fifth-placed Bayern by the end of the weekend.
Mirko Slomka's men looked anything but one of the top three sides in the country as they were totally outplayed by a Cologne side who have also enjoyed recent success over the champions.
Hannover, though, carved out the first chance as Jan Schlaudraff's shot from seven yards was turned away for a corner by goalkeeper Michael Rensing.
The visitors threatened again when Konstantin Rausch raced down the left, cut inside and got in a shot which Rensing again had to push behind.
But that was as good as it got for Hannover as the hosts took control.
Christian Eichner tested keeper Ron-Robert Zieler with a shot following Mato Jajalo's corner before Petit put Cologne in front in the 35th minute, the former Portugal midfielder firing a free-kick into the bottom corner.
And they ran away with the contest in the second half, Podolski taking a pass from Christian Clemens and rounding replacement keeper Florian Fromlowitz to score.
Fromlowitz had only come on for the injured Zieler in the 52nd minute and was having a miserable night, fumbling Podolski's ball in to leave Novakovic with a simple tap-in to make it 3-0 in the 79th minute.
And the Slovenian rounded off a thumping win a minute from time by heading home Adil Chihi's cross at the far post.