By Carlos Calvo
Herrera, whose club side America are champions and league leaders, was appointed by the Mexican Football Federation (FMF) for next month's two-legged playoff against New Zealand.
"No one likes to be changing coaches ... when the results don't come decisions have to be made," FMF president Justino Compean told a news conference.
"We've touched rock bottom ... Mexican football has been affected in all its aspects," said Compean before adding Herrera's appointment was temporary, for a warm-up against Finland on October 30 and the World Cup playoff.
Mexico, who finished fourth in CONCACAF's six-nation final group by the skin of their teeth, meet Oceania winners New Zealand at the Azteca on November 13 and in Wellington on November 20 for a place at the 2014 finals in Brazil.
Herrera replaces Victor Vucetich who took charge on September 12 but lasted two matches, a home win over Panama a week ago followed by a 2-1 defeat against Costa Rica on Tuesday that very nearly left Mexico out of the finals for the first time since 1990.
They only sealed a playoff berth after the United States, who qualified from the group with Costa Rica and Honduras, scored two late goals to beat Panama.
Herrera, a stocky 44-year-old former Mexico defender who is nicknamed Piojo (louse), is known for his strong temperament, straight talking and an ability to cajole his players into performing at their very best.
"He's a great coach who can give the national team ... a new wind. He's always made all his teams play well and that's what the national team need," said America's Argentine midfielder Rubens Sambueza.
Herrera steered America to their first league title since 2005 in last season's Clausura championship and they are now defending it from top place in the Apertura.
He is effectively on loan from America, one of Mexico's top teams who are owned by the highly influential media giant Televisa.
"We're lending our whole coaching staff and we hope they'll come back with the qualification for Brazil and return to America," Televisa official Yon de Luis told reporters.
The FMF may want to retain Herrera for the World Cup finals and there will be a board meeting in December to evaluate his performance and future.
"I've obtained the unconditional, absolute and unanimous support of all the clubs for Mr Herrera to secure our qualification to the World Cup," Compean said.
"His responsibility ends with qualifying us and afterwards there will be an analysis to see if he or another coach takes us to the 2014 World Cup. We have an (FMF) assembly on December 2."
Mexico have been to all the World Cup tournaments since 1986, apart from 1990 when they were banned for fielding over-age players in the World Youth Cup.
Coach Jose Manuel de la Torre, who had been in charge from the beginning of the long qualifying campaign, was sacked last month after the team suffered a rare home defeat at the Azteca and the danger of missing the finals started to become a reality.
His assistant Luis Fernando Tena, whose under-23 side won the London Olympic title last year, resigned after one match, a 2-0 defeat by the United States that secured their cross-border rivals's ticket to Brazil.
(Writing by Rex Gowar in Buenos Aires, editing by Alison Wildey and Tony Jimenez)