The visitors went ahead after only four minutes after some fine approach work. David Perkins curled an excellent left-foot shot out of the reach of Danny Coyne when set up by Mark Yeates.
Tranmere responded with an equalising goal from skipper Antony Kay on 12 minutes. Kay headed home at the far post from a cross by Bas Savage.
But Colchester refused to lie down and, when Perkins was bundled over in the 15th minute, Yeates powered home the free-kick into his left corner from 25 yards.
It should have been 2-2 on 26 minutes but Ed Sonko missed the target from Savage's deep cross with what should have been a simple header.
As play swung to the other end, Coyne did well to tip aside a goalbound effort by Yeates.
Tranmere looked dangerous every time they attacked but Sonko saw a drive saved by Dean Gerken and Savage had a shot deflected over.
United struck again five minutes ahead of the break with Clive Platt hitting home on the turn from eight yards after a great run by the impressive Yeates.
It was 4-1 just two minutes into the second period when Johnnie Jackson flighted home a shot from the corner of the box after more good work by Yeates.
Savage was just wide from 30 yards as the Merseysiders looked to get back in contention and the shell-shocked home side sent on subs George O'Callaghan and Chris Shuker.
Perkins and Yeates were outstanding for United, but the visitors handed Tranmere a lifeline when Gerken dropped a harmless Andy Taylor free-kick over the line on 76 minutes.
Two minutes later, Ryan Shotton blasted home from 30 yards and it was game on.
But an equaliser eluded the Merseysiders and United probably deserved the win.