He studied in primary school in Mexico City, but returned to his native town at age 17 to receive his inheritance. He worked as a cowboy and in the fields. His father died in 1807 when Álvarez was seventeen. Further complicating his life was that his father's land was tied up in a dispute over debts with a Spanish official. At the outbreak of the Mexican War of Independence in 1810, troops of insurgent priest José María Morelos came through Álvarez's remote village of Atoyac, and he joined the insurgency.