He has made many investigations relative to Mexican antiquities, and written Historia Antigua de Mexico, also several works on Aztec archaeology, especially on old monuments. While making excavations in the pyramids of Cholula, he discovered some idols that are now in the National Museum of Mexico.
He became a member of the Mexican Congress in 1869, and supported Presidents Benito Juárez, Sebastián Lerdo de Tejada, Manuel González, and Porfirio Díaz in succession, notwithstanding their different policies. On 25 June 1879, the government of Diaz ordered the execution of nine citizens of Vera Cruz who were suspected of conspiracy. This act was severely criticised, and great indignation was shown against Mier y Terán, who had executed the order, and against Diaz. Chavero, then grand master of a masonic lodge, and expelled Mier y Terán from the brotherhood, and suspended Diaz from his masonic rights. This action gave Chavero great popularity. In congress Chavero also made a strong speech against Mier and Diaz, but afterward became one of his adherents. Chavero was elected senator in 1886, and was professor in the mining and law schools of Mexico.
He is the author of the dramas “La Reina Xochitl” and “La tempestad de un beso,” “Quetzalcoatl,” “Los amores de Alarcón,” “La hermana de los Ávilas,” “El mundo de ahora,” and others. His books relative to Father Sahagún and to the Sun Stone are often referred to.