The Barcelona-based club sacked Mauricio Pochettino on Monday after the weekend's 2-0 defeat to Getafe left them bottom of the La Liga with just two wins from 13 games.
Former Mexico and Atletico Madrid boss Aguirre was quickly installed as one of the favourites to succeed him, with Espanyol confirming on Wednesday morning that he and assistant boss Alfredo Tena will take over at the Cornella-El Prat.
"Javier Aguirre and Espanyol have reached an agreement for the Mexican to be the coach of the club until the end of the season," a statement on the club's website read.
"Aguirre arrives accompanied by Alfredo Tena as assistant coach and Juan Iribarren as physio, who have accompanied him on all his past experiences as a coach."
Aguirre is due to arrive in Catalunya Wednesday afternoon to finalise the details of the deal but will not take charge of the team for Wednesday's Copa del Rey clash with Sevilla.
Espanyol B coach Raul Longhi will instead lead the team as they look to overturn a 3-1 first-leg deficit at home.
Aguirre is set to be officially unveiled at a press conference on Thursday, with the 53-year-old to take his first training session afterwards.
His first match in charge will be away to fellow strugglers Granada on Sunday.
Espanyol were prompted to sack Pochettino and sporting director Ramon Planes on Monday after sections of the home support jeered the former fan favourite during the Getafe defeat.
The 40-year-old took over as coach in January 2009 and led Espanyol away from the relegation zone into mid-table safety.
Finishes of 11th in 2009-2010, eighth in 2010-11 and 14th last season enhanced his reputation before this season's struggles.