He knocked the only goal of the game on 66 minutes following a superb following move.
That result sent Latics six points clear of the relegation places with only three games remaining in the season.
Manager John Sheridan handed a league debut to young defender George Edmundson who started the game at central defence in a 3-2-3-2 formation.
It would be Latics who had the first chance 80 seconds into the game as Jonathan Forte rattled the post from just inside the box.
Athletic were taking the game to their hosts and Tareiq Holmes-Dennis was the next to go close, striking inches past Dan Bentley’s goal early in the game.
Goalkeeper Joel Coleman was forced into a punch at the back post as Stephan McLaughlin’s shot was heading for the top corner on 16 minutes, whilst from the resulting corner, Tyrone Barnett headed onto the roof of the goal from six yards out.
Midway though the half, it would be Holmes-Dennis who again went close as he volleyed over the bar from 18 yards out and minutes later, Forte forced a smart save from Bentley after meeting Liam Kelly’s long ball.
Forte was causing a problem for the Southend defence and his cross on 25 minutes found an onrushing Lee Croft but the winger could not connect properly with the ball and the Shrimpers managed to clear.
Southend grew into the game and could have taken the lead before the half hour mark through a former Latics loanee.
David Worrall received space on the edge of the box but rushed his effort and struck over the crossbar.
However, the winger had the chance to redeem himself three minutes later as he again went through one-on-one with Coleman but it was the goalkeeper that came out the better again.
The home side were taking the game to Latics and Edmundson was forced into a last ditch tackle to deny Barnett six yards out.
Latics had to stay alert as from the resulting corner, Cameron Dummigan’s outstretched leg cleared the ball off the line following Barnett’s header.
Southend were winning a lot of the aerial balls, which was causing problems for Latics as central defender Adam Barrett had his header saved by Coleman from 10 yards out.
Shrimper’s top goalscorer Jack Payne had his first real sniff in the final five minutes of the half but Coleman held his shot from 20 yards well.
The visitors started the second half the stronger of the two as Dummigan had to block a Payne effort from the edge of the box as Latics were forced into early defending.
Minutes later, Payne’s shot was deflected goalwards by Ryan Leonard but fortunately for Latics it went the wrong side of the post.
Latics were growing into the game and should have taken the lead on the hour mark.
Forte raced through on goal, had two to his left but elected to go alone and Bentley saved his low drive.
The effort might have come back to haunt Latics but five minutes later, they took the lead through a very well worked goal.
Tim Dieng robbed the ball in the middle of the park, laid the ball into the path of Forte and he excellently picked out the onrushing Main who confidently place past the goalkeeper to put Latics ahead.
That goal seemed to settle Latics and they started playing with huge confidence, knocking the ball around well.
The lads were being backed by 193 vocal Latics supporters who did not stop singing throughout the game.
A flowing move on 80 minutes almost saw the second goal of the game. It was around 20 successful passes which saw Dummigan cross into the middle for Main but he could not connect at the back post.
Sheridan introduced Jake Cassidy in the final five minutes and the striker almost made an immediate impact.
He crossed into the centre for Croft who stabbed the ball inches past the post as Latics pushed for the goal to seal the game.
Cassidy was presented with two golden chances in the final minute of the game as he rounded the goalkeeper but was crowded out, and raced through one-on-one with Bentley but was denied by Leonard who raced past to dispossess him.
It was a professional end to the game for Latics as they dealt with balls into the box and kept possession to seal the vital three points in their bid for safety.
Southend United: Bentley, White, Thompson (McQueen 82’), Barrett, Coker, Worrall, Leonard, Deegan, McLaughlin (Loza 75’), Payne, Barnett.
Subs not used: Smith, Atkinson, Hurst, Kamara, Malarczyk.
Oldham Athletic: Coleman, B.Wilson, Edmundson, Gerrard, Holmes-Dennis, Dieng, Kelly, Dummigan, Forte (Cassidy 86’), Croft, Main.
Subs not used: Cornell, Brown, Mills, Tuohy, Poleon.
Goals: Southend United 0-1 Oldham Athletic (Main 66’)
Attendance: 6,315 (193 visiting supporters)