In March 1839 after the dissolution of the chamber by Louis Philippe, he was elected deputy for Paris (re-elected in 1842 and in 1846), and sat in the group of the Radical Left, being one of the leaders of the party hostile to Louis Philippe. On 24 February 1848 he pronounced in favour of the republic. Alphonse de Lamartine chose him as minister of education in the provisional government, and Carnot set to work to organize the primary school systems, proposing a law for obligatory and free primary instruction, and another for the secondary education of girls. He opposed purely secular schools, holding that "the minister and the schoolmaster are the two columns on which rests the edifice of the republic." By this attitude he alienated both the Right and the Republicans of the Extreme Left, and was forced to resign on 5 July 1848. He was one of those who protested against the "coup d'état" of 2 December 1851 but was not proscribed by Louis Napoleon. He refused to sit in the Corps Législatif until 1864, in order not to have to take the oath to the emperor.