As a military commander, Obregón was a strong supporter of Carranza when he took office, and helped him, as Minister of War and the Navy, to repel rebel forces loyal to Pancho Villa and Emiliano Zapata. In the political sphere, he adopted a radical line, and pushed through various changes to the new constitution of 1917, including the rights of workers to organize, strike, earn a minimum wage, and work a maximum number of hours. Once it was enacted, he retired from politics to pursue farming.
Obregón returned to politics in 1920, hoping to succeed Carranza as president. When it became apparent, however, that Carranza wanted to ensure that Ignacio Bonnilas would succeed him, Obregón organized the military in a successful revolt against the president. Carranza was killed in the state of Puebla in an ambush led by General Rodolfo Herrera as he fled from Mexico City to Veracruz on horseback. For six months, from June 1, 1920 to December 1, 1920, Adolfo de la Huerta served as provisional president of Mexico, until elections could be held. When Obregón was declared the victor, de la Huerta stepped down and assumed the position of Secretary of the Treasury in the new government.
Obregón's four years in office were known for the agrarian and anticlerical reforms he instituted and for the cultivation of good relations with the United States, based on the sale of Mexican petroleum to the American market. The greatest interruption to his term in office was a revolt by Adolfo de la Huerta, who regarded himself as the president's natural successor, while Obregón preferred Plutarco Elías Calles. Calles was elected and Obregón stepped down from office.
In 1928, Obregón ran again for office, winning a second term as president after a bitterly contested election. He returned to Mexico City to celebrate his victory, but was assassinated in a restaurant on July 17, 1928, by José de Leon Toral, a Roman Catholic seminary student opposed to Obregón's anticlerical platform.