Hidalgo was the second-born child of Don Cristóbal Hidalgo y Costilla and Doña Ana María Gallaga Mandarte Villaseñor. Hidalgo was born a criollo.[note 1] Under the system of the day, Hidalgo's rights as a criollo were far less than those of someone born in Spain but better than a mestizo, a person of both Spanish and Amerindian ancestry, and other castas. Both of Hidalgo's parents were descended from well-respected families within the criollo community. Hidalgo's father was an hacienda manager, which presented Hidalgo with the opportunity to learn at a young age to speak the indigenous languages of the laborers. Eight days after his birth, Hidalgo was baptized into the Roman Catholic faith in the parish church of Cuitzeo de los Naranjos. Hidalgo's parents would have three other sons; José Joaquín, Manuel Mariano, and José María.
In 1759, Charles III of Spain ascended to the throne of Spain; he soon sent out a visitor-general with the power to investigate and reform all parts of colonial government. During this period, Don Cristóbal was determined that Miguel and his younger brother Joaquín should both enter the priesthood and hierarchy of the Roman Catholic Church. Being of significant means he paid for all of his sons to receive the best education the region had to offer. After receiving private instruction, likely from the priest of the neighboring parish, Hidalgo was ready for further education. When the Jesuits were expelled from Mexico in 1767, he entered the Colegio de San Nicolás, where he studied for the priesthood.
He completed his preparatory education in 1770. After this, he went to the Royal and Pontifical University of Mexico in Mexico City for further study, earning his degree in philosophy and theology in 1773. His education for the priesthood was traditional, with subjects in Latin, rhetoric and logic. Like many priests in Mexico, he learned some Indian languages, such as Nahuatl, Otomi and Purépecha. He also studied Italian and French, which were not commonly studied in Mexico at this time. He earned the nickname "El Zorro" ("The Fox") for his reputation for cleverness at school. Hidalgo's study of French allowed him to read and study works of the Enlightenment current in Europe but, at the same time, forbidden by the Catholic church in Mexico.
Hidalgo was ordained as a priest in 1778 when he was 25 years old. From 1779 to 1792, he dedicated himself to teaching at the Colegio de San Nicolás Obispo in Valladolid (now Morelia); it was "one of the most important educational centers of the viceroyalty." He was a professor of Latin grammar and arts, as well as a theology professor. Beginning in 1787, he was named treasurer, vice-rector and secretary, becoming dean of the school in 1790 when he was 39. As rector, Hidalgo continued studying the liberal ideas that were coming from France and other parts of Europe. Authorities ousted him in 1792 for revising traditional teaching methods there, but also for "irregular handling of some funds." The Church sent him to work at the parishes of Colima and San Felipe Torres Mochas until he became the parish priest in Dolores, Guanajuato, succeeding his brother Felipe (also a priest), who died in 1802.
Although Hidalgo had a traditional education for the priesthood, as an educator at the Colegio de San Nicolás, he had innovated in teaching methods and curriculum. In his personal life, he did not advocate or live the way expected of 18th-century Mexican priests. Instead, his studies of Enlightenment-era ideas caused him to challenge traditional political and religious views. He questioned the absolute authority of the Spanish king and challenged numerous ideas presented by the Church, including the power of the popes, the virgin birth, and clerical celibacy. As a secular cleric, he was not bound by a vow of poverty, so he, like many other secular priests, pursued business activities, including owning three haciendas; but contrary to his vow of chastity, he formed liaisons with women. One was with Manuela Ramos Pichardo, with whom he had two children, as well as a child with Bibiana Lucero. He later lived with a woman named María Manuela Herrera, fathering two daughters out of wedlock with her, and later fathered three other children with a woman named Josefa Quintana. He enjoyed dancing and gambling.
These actions resulted in his appearance before the Court of the Inquisition, although the court did not find him guilty. Hidalgo was egalitarian. As parish priest in both San Felipe and Dolores, he opened his house to Indians and mestizos as well as creoles.