The Latics legend will leave Boundary Park with both parties saying the time is right and a change is needed.
He will take charge for one last time when they host Eastleigh on Saturday and will say goodbye to fans.
Oldham have endured a tough start to life outside the EFL after they came the first club drop from the Premier League to Non-League football.
Tuesday’s 3-0 loss at Woking was their fourth defeat from eight.
They sit 16th in the table - just two points above the drop zone.
The club announced in a statement that it was a mutual decision to part ways.
They said: “The completion of the Rothwell family takeover means that the club’s future has now been secured and with results so far not what everyone had been hoping for, John and the Club now feel that the time is right for both he and Latics to move on as we enter a new era.
“It goes without saying that John leaves on very good terms and with nothing but the thanks and utmost respect from the Board and the club.
“Shez will forever be a Latics legend and there will be discussions over a permanent tribute to his service at Boundary Park.
“A new manager will be appointed in due course.”