The outspoken 45-year-old coach leaves Club America to take over from Victor Manuel Vucetich, who was given just two games at the helm.
Herrera officially takes over Sunday after America's game against Cruz Azul on Saturday and becomes the fourth coach of El Tri in a little over a month.
"El Piojo" brings his entire backroom staff with him and takes over a team that scraped into the inter-confederation play-off stage where they will face New Zealand next month.
"It's not the ideal situation, nobody likes to be changing coaches," MFF president Justino Compean said.
"We are confident we will qualify with Miguel Herrera, along with the players who are fully committed."
Herrera's first game in charge is October 30 against Finland in San Diego.After that, Mexico faces New Zealand at Estadio Azteca on November 13 and in Wellington on November 20 in a bid to secure a place at the World Cup in Brazil next summer.