Phil Parkinson's League One side produced a shock result as Premiership-bound United made an early FA Cup exit.
United, semi-finalists three years ago, were killed off by a Gareth Williams goal in the 72nd minute as Neil warlock's plan to rest six first-team players backfired.
Colchester, chasing promotion and with one defeat in 15 games, outclassed the Bramall Lane side for long periods and could have won more comfortably.
United , 11 points clear in the race for the Premiership, were expected to win despite turning out a weaker side but were no match for an impressive Colchester outfit.
The Bramall Lane side went ahead in the fifth minute Steven Kabba grabbing his 10th of the season, the goal carved out by Michael Tonge.
Aidan Davison could only push away the midfielder's 20-yard shot as Lilian Nalis hit the bar with a stinging effort before Kabba steamed in to hit the target with a low strike.
Richard Garcia almost snatched an equaliser as he beat keeper Phil Barnes in a race for the ball and Chris Iwelumo fired wide before Colchester hit back on 33 minutes, Neil Danns lashing the ball in from close range.
Tonge almost grabbed a spectacular goal on 57 minutes sprinting 50 yards before unleashing a right-foot shot that was palmed away by Davison with Paul Ifill just failing to connect with the follow-up.
Substitute Williams hit the winner 18 minutes from time after Barnes had finger-tipped a Danns strike over the top.
Kevin Watson touched the corner to Mark Yeates and his cross was met with a glancing header from Williams at the near post.