A deflected Connor Brown goal just before half time secured Latics a vital victory taking them on to 50 points for the season.
Latics had to defend for large parts of the game but Brown's first ever professional goal ensured they made it six games unbeaten and the result has steered them further clear of the relegation places.
Colchester started the game the better of the two sides. Alex Gilbey found acres of space in the area from a corner but his header blazed over the bar.
Only minutes later, Adam Lockwood gave away a free kick in a promising position for the U's but Sanchez Watt's effort was comfortably saved by Paul Rachubka.
Latics started to get back into the game and went mightily close to opening the scoring midway through the half. Gary Harkins' aimless ball almost fell into the path of the on-rushing Jonson Clarke-Harris but Sam Walker in the U's goal managed to save with his feet.
Harkins was starting to become an influence on the game and he shot a couple of minutes later but that was blocked by a Colchester defender.
With only five minutes of the half remaining, the Scotsman used his pace and trickery to take him past two players but he was stopped in his tracks by Tom Eastman.
Latics capitalised on the increased pressure and took the lead just before half time. David Worrall fed Brown as he raced to the byline and his drilled ball across the box was deflected into the goal to give Latics the advantage.
Colchester started the second half brightly but could not find an equalising goal. Both Marcus Bean and Watt were denied by Rachubka as they put pressure on the defence.
The home side were dominating proceedings but could not earn themselves a clear-cut goalscoring chance.
Rachubka was the busier of the two goalkeepers but Colchester were restricted to shots from distance with efforts from Gilbey and Gavin Massey going over just after the hour mark.
Adam Lockwood and James Wilson both defended resolutely as the onslaught continued on the Latics goal going into the final stages of the game.
With ten minutes remaining, Grounds received a booking for kicking the ball away as Colchester looked to take a quick free kick.
The introduction of U's winger Dominic Vose forced confidence to build for the home side as he created a few chances but none of which troubled the Latics goalkeeper.
It was nervy going into the final seconds of the game but Latics defended well and came away from Essex with all three points.
Oldham Athletic: Rachubka, Brown, Wilson, Lockwood, Grounds, Worrall, Smith, Wesolowski, Harkins, Philliskirk, Clarke-Harris.
Subs not used: Coleman, MacDonald, Dayton, Gafaiti, Byrom, Mellor, Millar.
Colchester United: Walker, Okuonghae, Watt (Vose 72'), Sears, Bean, Wynter (Morrison 88'), Ibehre, Eastman, Wilson, Massey, Gilbey (Wright 88').
Subs not used: Cousins, Dickson, Eastmond, Olufemi.
Goals: Colchester United 0-1 Oldham Athletic (Brown 45')
Attendance: 4252 (396 visiting supporters)