The promotion-chasing Suffolk side came from a goal down to secure victory in the derby clash.
It was a match dominated by Town but City took the lead in the fifth minute through a stunning Ched Evans strike.
The forward, on loan from Manchester City, drilled the ball into the bottom left corner from 25 yards after Ipswich lost the ball in midfield.
But the hosts hit back in the 12th minute through a bizarre own goal from City centre-back Alex Pearce.
Pearce diverted a drilled Haynes’ cross into his own net from six yards as he attempted to clear.
Ipswich then went ahead in the 39th minute when Haynes latched on to a Pablo Counago through ball to convert past City goalkeeper David Marshall.