Boselli entered the Chamber of Deputies in 1870, to begin a political career there that lasted until 1921. Identified as a Liberal, Boselli found that his skills in economics and finance brought him ministerial portfolios under a diverse succession of premiers from 1888 until the start of the twentieth century. After serving as minister of education in the cabinet of Sidney Sonnino, Boselli seemed to abandon an active interest in politics in 1906. Nearing seventy years of age, he began to devote his remaining energies to the irredentist Dante Alighieri Society and its mission of promoting the spread of Italian influence and culture.
The outbreak of World War I brought Boselli back to an active interest in political affairs. He favored Italian intervention and contributed obliquely to Italy's entry into the war. In May 1915, after Premier Salandra had resigned over his policy of joining the side of the Entente, Boselli declined an invitation from King Victor Emmanuel III to form a government. This had the effect of turning the monarch back to Salandra. By the summer of 1916, however, Salandra's conduct of the war had run into the sand. Five Italian offensives on the Isonzo had won little territory at the cost of heavy casualties. The Austrians, in May 1916, had launched their Strafexpedition from the Trentino, threatening to cut to the south into the plains behind the Isonzo front.
Boselli, then seventy-eight years old, formed a national government. Nineteen cabinet ministers, including four without portfolios, were drawn from a multitude of political parties ranging from the Socialists to the Catholics. The strongest figure in the government was a holdover from the Salandra years, Foreign Minister Sidney Sonnino, whose policy centered around Italian territorial expansion in the Adriatic. Boselli found his prestige buoyed up at once by Italy's first great military victory of the war, the thrust to Gorizia during the Sixth Battle of the Isonzo (August 1916). The government demonstrated its solidarity with its allies by declaring war on Germany (August 28), but Italy's military prospects soon dimmed. Three more Isonzo campaigns (September to November) brought only the usual heavy casualties; and these setbacks took place against grim news from Rumania and Russia, where the weakness of Italy's allies was all too evident.
With Boselli in tow, Sonnino continued to set the direction of foreign policy. At Rome (January 1917) and St. Jean de Maurienne (April 1917), Sonnino helped block efforts by the Western Allies to seek a compromise peace with Vienna. A moderate peace settlement with Austria-Hungary was sure to explode Sonnino's hopes for gains on the eastern shore of the Adriatic. The other major decision to come from the diplomatic gatherings of early 1917 was also a negative one: the Allies could not agree to launch a major offensive on the Italian front in 1917. When the Italians did so themselves - the Eleventh Battle of the Isonzo (August 1917) - it rattled Austro- Hungarian leaders enough to call on Berlin for military help. The result came in the form of the Austro-German breakthrough at Caporetto in October 1917.
Caporetto would have dragged down even a popular and respected premier. But by the fall of 1917, Boselli was neither. Attacked by the Right for his refusal to repress civil unrest and silence dissent, he was also assailed by the Chamber's sizable neutralist bloc as well for remaining in the war. Politicians of all persuasions found Boselli too old and feeble to meet the demands of the conflict; his oversize cabinet was compared unfavorably to the small war cabinet adopted in Great Britain. On October 25, 1917, Boselli's enemies from all sides joined to throw him out of office by a resounding vote of 314 to 96.
In the postwar era, the aged political leader wrote one last chapter in his career. In 1921 he left the Chamber of Deputies for the Senate. There he rallied to the Fascist regime of Benito Mussolini. In March 1929, at the age of ninety-one, the former premier spoke for the government in seeking approval of the Lateran Agreements with the Vatican.