Javier Aguirre is to leave Espanyol after Saturday's season finale at Real Madrid.
The news was confirmed in the team's prematch news conference on Friday after talks over a new contract proved unsuccessful.
"I thank everyone involved in the club for all their support,'' Aguirre said. "We decided to bring an end to this stage.
"I want to thank the fans who have helped us a lot.''
The 55-year-old Mexican has been in talks with club president Jean Collet in recent weeks but speculation had been mounting as the talks drew on, with Aguirre being linked with a return to international football.
"I thank Aguirre and I wish him all the luck in the world,'' said Collet, who appeared alongside the departing coach at Friday's news conference.
Espanyol sit 12th in the table going into the final round of fixtures.