Second-half goals by Steve Thompson, Peter Whittingham, Jimmy Floyd Hasselbaink and an own goal gave Cardiff City a welcome victory in their fight to move away from the relegation zone.
The visitors had taken the lead through Johnnie Jackson in the last minute of the first half, but that was totally against the run of play and the Bluebirds fully deserved the win with their second-half salvo.
There were four changes in the Cardiff line-up with Kevin McNaughton, Roger Johnson, Whittingham and Hasselbaink all being given places in the starting line-up.
Colchester included 41-year-old Teddy Sherringham, along with former Swan Kevin McLeod, who also played for QPR in City's play-off victory of 2003.
City won the first corner in the eighth minute, but Whittingham failed to find a team-mate and the visitors cleared down the field.
Thompson beat the offside track and a couple of defenders midway through the half but his shot was deflected for a corner.
Another City corner taken by Whittingham three minutes later almost led to a goal, but Johnson's powering header was hacked off the line by Kevin Watson.
Colchester keeper Dean Gerken saved his side in the 27th minute when he pushed a Hasselbaink shot on to a post after Paul Parry had sent the City man into the clear.
It was 38 minutes before Colchester won their first corner, such was Cardiff's superiority, but they couldn't break down the visitors' defence and, in the 44th minute, the game was completely turned round when a cross from McLeod was allowed to bounce inside the City's six-yard box and Jackson raced in to slam the ball home from close range.
It took Cardiff eight minutes of the second half to equalise and it came from a diving near-post header by Thompson following a Hasselbaink cross from the right.
City were now looking for a second goal but they were almost caught out in the 56th minute, when a slip by Chris Gunter left McLeod free, but Kasper Schmeichel beat away his shot and sent the Bluebirds back on the attack.
A ball from Parry found Whittingham in space on the left and his shot took a slight deflection before hitting the back of the net to give City the lead.
City went further ahead in the 66th minute when Whittingham stepped over a pass, leaving Thompson free to slide the ball across the area to the waiting Hasselbaink who sidefooted home.
Three minutes after that the points were in the bag when the impressive Whittingham flashed in another shot that Colchester defender Adam Virgo sliced into his own net.
The visitors briefly threatened the home goal in the closing stages, but it was the Bluebirds who looked more likely to add to their lead.