Ian Henderson headed Colchester ahead in the fourth minute from Brian Wilson's cross and Rovers goalkeeper Andy Coughlin denied Anthony Wordsworth soon after.
Henderson then clipped the top of the crossbar before Colchester doubled their lead two minutes after half-time through Tom Eastman, who powered in a header at the far post from Lloyd James's delivery.
Rovers pulled a goal back five minutes later when James Wallis's low shot from 25 yards skidded into the net, but Colchester restored their lead midway through the second half when Tranmere defender Ian Goodison diverted in Michael Rose's corner into his own goal.
Although Lucas Akins pulled a goal back for Rovers with 18 minutes to go after Colchester had failed to deal with a corner, substitute Freddie Sears wrapped up the U's victory with six minutes left with a fine solo strike.
Henderson headed against the foot of the post just before the end, as Colchester claimed victory.