Brooke drilled home a fine shot from Deane Smalley's pass 16 minutes from time to ensure that manager Joe Royle finished his second spell as Latics boss with his first victory in nine games.
It was the third successive home defeat for Walsall despite a flying start with a goal after just 30 seconds when Alex Nicholls beat Oldham keeper Greg Fleming in the right-hand corner of the penalty box and crossed for Troy Deeney to head his 12th goal of the season.
Deeney beat Fleming again with a 25-yard drive in the 32nd minute but the ball came back off the crossbar and from that moment Oldham were the better side.
It was no more than they deserved when Smalley drove in a loose ball from Ian Westlake's header to equalise a minute from half-time.
In the second half, Latics' keeper Fleming pulled off one fine save from Richard Taundry, but the visitors' defence coped easily with Walsall's tame efforts to get their first home win in four attempts and Brooke ensured Oldham's first win in 12 games with his memorable debut goal.