The provisional government invited Courtais to assume the rank of General and the command of the National Guard of Paris.
On 23 April 1848 he was elected by a decisive majority to represent Allier in the Constituent Assembly.
He was both a representative and leader of the National Guard when the Assembly was invaded by the mob on 15 May 1848.
General Courtais acted indecisively, and told the guard not to use force against the people.
Some managed to enter, but most tried to enter through the rue de Bourgogne, where they found the gate closed and began trying to break it down.
Courtais tried to harangue the crowd and persuade them to disperse, but with no effect.
The crowd forced through the gate, knocking him down, and great confusion followed.
The few guardsmen who were present ran for their arms.
Courtais went to Alphonse de Lamartine for advice, but although he was told to place himself at the head of his troops, he continued to wander around without doing anything.
He returned to the Assembly at five o'clock, when the room had been emptied of demonstrators.
He then told the National Guard to withdraw.
He was attacked by some of the representatives, who called him a traitor, seized his sword and stripped off his epaulets.
Other representatives intervened, and took him to the library where he was held in custody.
Léon Faucher formally proposed that the general be declared a traitor.
Courtais submitted to a year of pre-trial detention before being given his freedom by the High Court of Bourges on 2 April 1849.
He returned to the Constituent Assembly, and participated in its final sessions in April and May 1849.
He then left politics.
In 1871, Courtois was elected to the general council of Allier representing the canton of Montmarault.
Courtais died on 10 June 1877 in Doyet, Allier.
He was aged 87.