Born in Tetela de Ocampo in the Sierra Norte de Puebla, Méndez worked in commerce and livestock until 1847. In that year, he enlisted in the army to fight the United States in the Mexican–American War. He continued in the army after the war, and on 15 December 1854 he was named commander of a battalion in the PueblaNational Guard. His unit adhered to the Plan de Ayutla in 1854 and took an active part in the War of the Reform, the War of the French Intervention and the war opposing Emperor Maximilian. He defended Puebla against the rebels of Zacapoaxtla in January 1856 and fought the Conservatives in the mountains of Puebla and Tlaxcala in 1857. The same year, he was promoted to colonel of infantry. In 1858, he was made treasurer of the State of Puebla and prefect of the Department of Zacatlán. He fought in the Battle of Puebla against the French on 5 May 1862 and took part in the defense of the city during the subsequent siege. On 27 July 1863, he was promoted to brigadier general. That year, he was also named governor and military commander of Puebla. He was later taken prisoner by the French, who sent him into exile on 17 January 1866. He managed to return to the country on 31 July 1866. On 26 August 1866, he became political chief of the Sierra Norte, and afterwards commander in chief of the forces of the State of Puebla. Together with General :es:Sóstenes Rocha|Sóstenes Rocha, he took part in the siege ofQuerétaro in 1867. He was again named governor and military commander of Puebla on 16 April 1867, positions he held until 15 January of the following year. He took part in the revolutions of La Noria and Tuxtepec.
With the success of the Plan de Tuxtepec, Díaz temporarily turned overthe government to Méndez on 6 December 1876 in order to take the field to fight the partisans of José María Iglesias. Iglesias claimed to be the legal president of Mexico. As interim president, Méndez called elections, which Díaz won. Méndez's term ended on 17 February 1877 with the return of Díaz to the presidency.
After the presidency
Méndez entered the Senate in 1877, where he worked to end the military draft. He was a senator until 1880. He was governor of Puebla for a third time, from 1 October 1880 to 31 January 1885. On 3 February 1885, he became president of the Supreme Military Court, where he served until his death in Mexico City in 1894. He left no property or money.