PARIS—Nicolas Sarkozy’s campaign to reclaim the French presidency came to an abrupt end after a surge of support for his former prime minister, notching another upset in a year of electoral upheaval for the West’s political establishment.

Mr. Sarkozy, who centered his campaign on pledges for hard-line security measures and a clampdown on immigration, was hobbled in the conservative primary race by François Fillon, his once-close ally who ran on a pledge to deliver a shock to the French economy with deep spending cuts and labor...