Portes Gil was born in Ciudad Victoria, the capital of the state of Tamaulipas in northwest Mexico. The outbreak of the Mexican Revolution found him studying law at Mexico City's Escuela Libre de Derecho. In late 1914 he allied himself with revolutionary Venustiano Carranza (who would assume the presidency of the country the following May) and, when he graduated in 1915, he had already begun his career in the public administration with a posting in the Department of Military Justice.
Over the ensuing years he continued to serve the government in both a legal capacity – supreme state court judge in Sonora; legal advisor to the Ministry of War – and in elective office: he was elected to Congress in 1917, 1921, and 1923, and he served as governor of his native Tamaulipas on two occasions (1920 and 1925).
Between 28 August and 30 November 1928 he was Minister of the Interior in the cabinet of Plutarco Elías Calles. Since president-elect Álvaro Obregón had been assassinated on 17 July, it fell to Portes Gil to assume office as provisional president for a period of 14 months while fresh elections were called.
Faced with a university strike during his period in office, he managed to defuse the situation by convening a special session of Congress that ultimately enacted the legislation whereby the National University of Mexico was granted its autonomy. He also attempted to negotiate the withdrawal of the United States troops from Nicaragua in exchange for the surrender of General Augusto Sandino; when the talks failed, he granted Sandino political asylum in Mexico – and a parcel of land in Temixco.
He handed on the presidential sash to Pascual Ortiz Rubio on 5 February 1930, in whose cabinet he then served for 18 months as interior minister. He subsequently traveled to Europe as Mexico's first representative to the League of Nations. Under later presidents he served in various capacities, including ambassador, foreign minister, attorney-general, and president of the Partido Nacional Revolucionario – the National Revolutionary Party, which would later restyle itself the Institutional Revolutionary Party (PRI).