Oldham's recent revival ended as Colin Larkin scored twice in the first half to give Chesterfield victory.
Larkin opened the scoring for Chesterfield with a neat headed finish after 14 minutes.
He then added a second on the half-hour when he comfortably beat goalkeeper Les Pogliacomi to put Chesterfield in command as Oldham struggled.
Eardley scored his first senior goal for Oldham with a well-taken free-kick, but their promotion push was dented.
Chesterfield: Roche, Bailey, Picken, Hazell, Downes, Hall, Allott, Niven, Hurst, Shaw, Larkin.
Subs Not Used: Jordan, Jackson, Kovacs, Davies, Allison.
Goals: Larkin 14, 33.
Oldham: Pogliacomi, Eardley (Wolfenden 84), Haining, Gregan, Charlton, Liddell (Edwards 62), McDonald, Wellens, Taylor, Warne, Porter (Hall 46).
Subs Not Used: Legzdins, Rocastle.
Booked: Wellens, Charlton.
Goals: Eardley 45.
Ref: E Ilderton (Tyne & Wear).