Ryan Brooke made a dream goalscoring debut to ensure that Joe Royle ended his brief spell in charge of Oldham with a win as Walsall threw away a golden start at the Banks' Stadium.
Substitute Brooke, 17, had only been on the pitch for two minutes when he converted a 74th-minute cross from Deane Smalley with his first touch in senior football.
It ended a run of four draws and four defeats for Royle. He will now hand over the reins to the watching Dave Penney who quit Darlington on Thursday to take charge at Boundary Park.
Oldham had earned the win, their first in 12 games, the hard way as they had fallen behind after just 30 seconds to Troy Deeney's 12th goal of the season.
Smalley dragged Oldham on to level terms just before half-time and then teed up Brooke to make his dramatic impact as he ensured that Walsall ended the season with a third successive home defeat.
Oldham initially fell behind when they were undone down their left-hand side - a position they had to re-jig seconds before kick-off when full-back Daniel Jones suffered a suspected broken foot while warming up.
Jones was replaced by Paul Black but there was nothing he could do to stop Alex Nicholls surging clear.
Nicholls had been sent clear by Deeney who then raced into the area before converting a neat header from 12 yards.
Deeney, who had failed to score in the previous seven games, almost doubled Walsall's advantage in the 31st minute when his dipping volley beat Greg Fleming only to crash to safety off the bar.
That let-off finally sparked Oldham into life with Kevin Maher shooting wide and Smalley having a close-range drive blocked by Richard Taundry.
But Smalley was not to be denied when he was presented with a second chance on the stroke of half-time.
This time he found himself unmarked just six yards from goal and made no mistake with a powerful volley when he latched on to a header from Ian Westlake.
Oldham were fortunate to stay on level terms though when Fleming beat away a powerful 30-yard drive from Taundry in the 59th minute, but they always looked the side most capable of grabbing a winner.
Westlake was denied by Clayton Ince in the 61st minute but the Trinidad and Tobago international was powerless to stop Brooke who produced a piece of finishing that belied his years.