Matt Smith's late goal condemned Bury to relegation from League One and earned Oldham Athletic a vital three points in their own survival battle.
Kevin Blackwell's Shakers are down after two seasons in the third tier.
Aware that defeat would confirm their demotion to League Two, Bury controlled a dour first half, Andy Bishop heading their best chance wide.
Zac Thompson also came close, while Oldham rarely threatened until Smith nodded in Kirk Millar's cross.
Oldham winger Cristian Montano saw an early shot saved by Bury goalkeeper Cameron Belford, while Lee Croft tamely shot wide and Robbie Simpson headed over.
After the break Thompson shot straight at Dean Bouzanis and later fired wide, while Bury's on-loan striker Jonson Clarke-Harris nodded just wide of a post.
And the Shakers were made to pay as giant striker Smith netted his ninth goal of the campaign to put Blackwell's side out of their misery.