Juan José Castelli was born in Buenos Aires, and went to school at the Real Colegio de San Carlos in Buenos Aires and Monserrat College in the city of Córdoba, Argentina. He graduated as a lawyer from the University of Charcas, in Upper Peru. His cousin, Manuel Belgrano, introduced him to the public administration of the Viceroyalty of the Rio de la Plata. Along with Belgrano, Nicolás Rodríguez Peña, and Hipólito Vieytes, Castelli planned a revolution to replace the absolute monarchy with the new ideas of the Age of Enlightenment. He led the Buenos Aires patriots during the May Revolution, which ended with the removal of viceroy Baltasar Hidalgo de Cisneros from power. He is known as the "Speaker of the Revolution" for his speech during the open cabildo held in Buenos Aires on 22 May 1810.