Barrot was born at Villefort, Lozère. He belonged to a legal family, his father, an advocate of Toulouse, having been a member of the Convention who had voted against the death of Louis XVI. Odilon Barrot's earliest recollections were of the October insurrection of 1795. He was sent to the military school of Saint-Cyr, but later moved to the Lycee Napoleon to study law and was called to the Parisian bar in 1811. He married the granddaughter of the liberal politician Guillaume-Xavier Labbey de Pompières. He was the brother of Adolphe Barrot and Ferdinand Barrot. He was placed in the office of the conventionel Jean Mailhe, who was advocate before the council of state and the court of cassation and was proscribed at the second restoration. Barrot eventually succeeded him in both positions. His dissatisfaction with the government of the restoration was shown in his conduct of some political trials. For his opposition in 1820 to a law by which any person might be arrested and detained on a warrant signed by three ministers, he was summoned before a court of assize, but acquitted. Although intimate with Lafayette and others, he took no share in their schemes for the overthrow of the government, but in 1827 he joined the association known as "Aide-toi, le ciel t'aidera".
July Monarchy
He presided over the banquet given by the society to the 221 deputies who had signed the address of March 1830 to Charles X, and threatened to reply to force by force. After the ordinances of 26 July 1830, he joined the National Guard and took an active part in the revolution. As secretary of the municipal commission, which sat at the hôtel-de-ville and formed itself into a provisional government, he was charged to convey to the chamber of deputies a protest embodying the terms which the advanced Liberals wished to impose on the king to be elected. He supported the idea of a constitutional monarchy against the extreme Republicans, and he was appointed one of the three commissioners chosen to escort Charles X out of France. On his return he was nominated prefect of the Seinedépartement. His concessions to the Parisian mob and his extreme gentleness towards those who demanded the prosecution of the ministers of Charles X led to an unflattering comparison with Jérôme Pétion under similar circumstances. Louis Philippe's government was far from satisfying his desires for reform, and he persistently urged the "broadening of the bases of the monarchy," while he protested his loyalty to the dynasty. He was returned to the chamber of deputies for the department of Eure in 1831. The day after the demonstration of June 1832 on the occasion of the funeral of General Lamarque, he made himself indirectly the mouthpiece of the Democrats in an interview with Louis Philippe, which is given at length in his Mêmoires. Subsequently, in pleading before the court of cassation on behalf of one of the rioters, he secured the annulling of the judgments given by the council of war. The death of the Duke of Orleans in 1842 was a blow to Barrot's party, which sought to substitute the regency of the Duchess of Orleans for that of the Duke of Nemours in the event of the succession of the Comte de Paris. In 1846 Barrot made a tour in the Near East, returning in time to take part a second time in the preliminaries of revolution. He organized banquets of the disaffected in the various cities of France, and demanded electoral reform to avoid revolution. He did not foresee the strength of the outbreak for which his eloquence had prepared the way, and clung to the programme of 1830. He tried to support the regency of the duchess in the chamber on 24 February, only to find that the time was past for half-measures.
Second Republic
After the Revolution of 1848, Barrot acquiesced in the republic and gave his adhesion to General Cavaignac. In the December 1848 election for President of the republic, Napoleon won with 5,434,266 votes to 1,448,107 for Cavaignac. Napoleon took his oath on 20 December 1848 a day ahead of schedule, and appointed a ministry that included Barrot and the conservative Frédéric Alfred Pierre, comte de Falloux. Barrot was Minister of Justice and "president of the council of ministers when Napoleon was absent". Following national elections, the Constituent Assembly was replaced by the Legislative Assembly, which sat for the first time on 28 May 1849. On 2 June 1849 a new ministry was announced, again headed by Barrot. It included de Tocqueville as Minister of Foreign Affairs. This ministry was dissolved by Napoleon on 31 October 1849. The new ministry did not have a "president when Napoleon was absent". A biographer said that Barrot had hoped to extract Liberal measures, but was dismissed as soon as he had served the president's purpose of avoiding open conflict.
Later career
After the coup d'état of December 1851 Barrot was one of those who sought to accuse Napoleon of high treason. He was imprisoned for a short time and retired from active politics for some ten years. He was drawn once more into affairs by the hopes of reform held out by Émile Ollivier, accepting in 1869 the presidency of an extraparliamentary committee on decentralization. After the fall of the empire he was nominated by Adolphe Thiers, whom he had supported under Louis Philippe, as president of the council of state, but his powers were failing, and he had only filled his new office for about a year when he died at Bougival. Barrot was described by Paul Thureau-Dangin as "the most solemn of the undecided, the most meditating of the unwise, the happiest of the ambitious, the most austere of the courtiers of the crowd".