It was the ideal start for the home side as a long ball forward managed to beat the Cardiff defence, allowing Freddie Sears to sprint clear before beating David Marshall with a deflected effort to continue his fine run in front of goal.
Ipswich continued to apply pressure after being pegged back, but they had to wait until Cole Skuse produced a moment of magic to regain the lead as the midfielder scored his first goal for the club from 25 yards.
After missing a good chance to extend the lead when Tommy Smith headed over, Mick McCarthy's side were given a scare just before the break when Fabio somehow managed to miss the target from a few yards out after being found by Joe Mason.
Superb goalkeeping prevented Ipswich from adding a third early in the second half as Daryl Murphy found the space to direct a firm header at goal, only to see Marshall get a vital hand to the ball.
It was scrappy for much of the second half, but Ipswich looked the more threatening of the two sides and a second Cardiff equaliser never appeared to be on the cards.
Despite looking vulnerable to the counter-attack, the home side continued to put the pressure on and they were agonisingly close to another goal when Christophe Berra struck the crossbar after Marshall had denied Smith.
That miss proved to be crucial as Ipswich wrapped up the win in stoppage time when Skuse played in Murphy, who kept his composure to find the bottom corner.