A brace from centre-back Richard Hinds and strike by Keanu Marsh-Brown ensured the Glovers secured their place in the next round.
The hosts got off to a flying start after only four minutes, scoring their first League Cup goal in four years. Midfielder Ed Upson's cross caused confusion among the Colchester defence, with Hinds decisively rifling a right-footed shot past U's goalkeeper Mark Cousins from close range.
The home side doubled their lead after 44 minutes when Upson's outswinging corner was powerfully met by the head of Hinds, with the ball flying into the top corner of the net.
The Glovers notched a third with 13 minutes remaining, with substitute Marsh-Brown breaking the offside trap and neatly chipping the ball over the onrushing Cousins.
The visitors, who were without striker Freddie Sears due to personal reasons, rallied after the break but it was the Somerset side who took the spoils ahead of Saturday's npower League One kick-off.