Josh Law opened the scoring for Latics midway through the first half before Junior Brown equalised minutes before the break.
Ivan Toney converted a penalty on 50 minutes whilst Joe Riley extended their lead to 3-1 on the hour mark.
Ousmane Fane was dismissed on 70 minutes for two bookable offences and 10 minutes before the end, Lee Erwin pulled a goal back.
Latics huffed and puffed for an equaliser but Freddie Ladapo’s effort into added on time rebounded off the crossbar and away to safety.
The result ended Latics’ four game unbeaten run in the league as they fell to their first defeat since the opening day loss against Millwall.
Manager Stephen Robinson made six changes to his starting 11 from midweek, with Freddie Ladapo retaining his place in attack.
The forward looked bright from the start, winning Latics an early corner after a smart turn on the left but it came to nothing.
Athletic had the first chance of the game on nine minutes as Paul Green’s floated free kick to the back post found the onrushing Erwin but he headed inches wide.
Shrewsbury possibly could have taken the lead minutes later as Louis Dodds raced through on goal but Law did well to force him wide and the eventual shot was tame and easily saved.
Midway through the half, Ivan Toney, who earlier had a tussle with Fane, had a snapshot from 30 yards which only just went over Connor Ripley’s crossbar.
However, from the following goal kick, the ball found Law whose driven run caused problems for Shrewsbury. He passed into Billy Mckay who was fouled 20 yards out.
Law stepped up and curled the ball around the wall and into the bottom corner to give Latics the lead on 24 minutes.
That goal settled Latics and they started to knock the ball around well.
Abu Ogogo earned the first booking of the game for a foul on Law and two minutes later, Fane found his way into the referee’s notebook for a challenge on Toney as Shrewsbury looked to break.
The referee was making himself unpopular with the home supporters as captain Peter Clarke looked to be manhandled in the penalty area but he waved the penalty protests away.
Shrewsbury Town started to apply the pressure in the final five minutes of the first half.
Ogogo skidded an effort wide whilst Ripley had to be alert to punch a corner clear as half time approached.
However, on 43 minutes, the Shrews did manage to get level through full back Brown.
Joe Riley delivered a ball into the box and Brown managed to loop a header over Ripley and the ball rebounded off the crossbar and went over the line to bring the scores level going into the half time break.
Latics almost regained the lead a minute after the break as Ladapo turned in the box but his snapshot went wide of the post.
However, Shrewsbury were awarded a penalty on 49 minutes as a player was allegedly held in the penalty area.
Toney stepped up and sent Ripley the wrong way to give the Shrews the lead early in the second half.
The referee, who was already unpopular in the first half, continued that in the second half with a number of decisions which incensed the Oldham Athletic supporters.
After Clarke was held to the floor in the penalty, the referee did not award a penalty and two minutes later subsequently was booked for his protests.
Just after the hour mark, Riley made it 3-1 to the visitors, powerfully striking past Ripley from 18 yards after the full back received too much space on the right.
Latics needed a lift but the referee awarded Fane a second yellow card for a clumsy challenge in midfield and the midfielder was sent off.
Athletic needed a bit of luck in front of goal, and substitute Darius Osei forced a smart save from Jayson Leutwiler.
The striker had another effort 10 minutes from time but this time Leutwiler tipped inches past the post as Latics went in search of a way back into the game.
They did get that goal back on 82 minutes through Erwin.
Green’s corner into the box was cleared to the Erwin 10 yards out and he smashed the ball into the bottom corner to pull a goal back.
Latics piled on the pressure in the final 10 minutes of the game but were met by a stubborn Shrewsbury Town defence.
As the fourth official indicated seven minutes of additional time, two minutes into it, Ladapo smashed the crossbar.
Law’s cross found the foot of the Crystal Palace loanee but he rebounded off the crossbar and out to safety.
That was the best it got for Latics who unfortunately fell to defeat, ending their run of four games in the league unbeaten.
Oldham Athletic: Ripley, Law, Burgess, Clarke, Dunne (Banks 83’), Fane, Green, Flynn (Croft 61’), Erwin, Mckay (Osei 61’), Ladapo.
Subs not used: Kettings, Wilson, Klok, McLaughlin.
Shrewsbury Town: Leutwiler, Riley, Lancashire, Ogogo, Toney (Waring 81’), Dodds (Black 79’), Brown, Grimmer, Deegan, El-Abd, Ebanks-Blake (Mangan 60’).
Subs not used: Halstead, Whalley, Sarcevic, El Ouriachi.
Goals: Oldham Athletic (Law 24’, Erwin 82’) 2-3 Shrewsbury Town (Brown 43’, Toney 50’, Riley 62’)