The Sky Bet Championship side sailed into a three-goal lead in front of a crowd of just 4,194 at the Cardiff City Stadium after strikes from Joe Ralls, Kadeem Harris and Kenwyne Jones, before Freddy Sears pulled one back for Colchester with just 15 minutes remaining.
Despite some late pressure from the side just one place off the bottom of League One it was Cardiff who held on to progress to the next round.
After a cagey opening from both sides it took 13 minutes for Cardiff to produce their first chance of the game as midfielder Ralls produced a powerful drive from around 25 yards, forcing a smart diving save from Sam Walker in the Colchester goal.
The visitors produced a glorious chance of their own just minutes later as former QPR defender Kaspars Gorkss took advantage of poor Cardiff marking to power a header narrowly wide from a corner.
But as the half wore on it was the Championship side who were starting to dominate proceedings and Peter Whittingham went within inches of giving the hosts the lead, hitting the crossbar direct from a corner.
However, the pressure told as Colchester failed to clear another Whittingham corner properly and Ralls was on hand to fire a shot goalwards from outside the penalty area. The ball took a huge deflection off Cole Kpekawa on the way through, leaving Walker stranded to hand the breakthrough to the home side.
Things could have got even better for Cardiff moments later as Tom Adeyemi produced a driving run at the heart of the Colchester defence before firing a low strike from the edge of the box on target, but Walker produced a brilliant save to deny the former Birmingham midfielder.
The game suddenly burst into life and it was Colchester who responded in good fashion as Sean Clohessy found Gavin Massey in space just inside the Cardiff penalty area, but the U’s striker failed to beat Simon Moore, who got down low to push the ball away from goal.
Colchester would have been looking to start the second half in the same vein they finished the first 45 minutes, but it was Cardiff who made the perfect start after the break as Harris acrobatically hooked Ben Turner’s knockdown from Whittingham’s corner into the bottom-left corner to double Russell Slade’s side’s lead.
The visitors were now staring down the barrel of a heavy defeat and Adeyemi headed John Brayford’s cross wide of the Colchester goal from the centre of the box.
On the hour mark Slade called for Jones from the bench and Trinidadian made an immediate impact, heading home another Whittingham corner to score his 10th goal of the season.
Cardiff were in full control and would have had two more goals but for an excellent Walker save from Craig Noone’s long-range effort and Adeyemi failing to connect with Whittingham’s corner with the goal at his mercy.
But it was Colchester who were handed a lifeline with 15 minutes remaining as former West Ham striker Sears powered a strike past Moore from inside the area after unselfish play from substitute Sanchez Watt.
Colchester now sensed an unlikely comeback and looked to pile the pressure on onto their nervy opponents at every opportunity.
But, despite some very anxious moments, in the end the Bluebirds held on for victory and now await Monday’s fourth-round draw.