Portuguese coach Peseiro, who spent one season with the Greek Super League side, made the announcement following the match in the league's final European playoff round.
"It was a decision by both parties," Peseiro told a news conference.
Aris Salonika boss Dusan Bajevic - who has previously coached both AEK and Olympiakos Piraeus - is the early favourite for the Panathinaikos job.
For AEK, former Larissa coach Donis will take over from caretaker boss Nikos Kostenoglou, the club announced on its Web site (www.aekfc.gr).
AEK were runners-up in the league behind champions Olympiakos but will take part in next season's UEFA Cup after finishing second in the playoff to Panathinaikos who qualify for the Champions League second qualifying round.