He wrote to Lamartine announcing his arrival, saying that he "was without any other ambition than that of serving my country." Lamartine wrote back politely but firmly, asking Louis-Napoleon to leave Paris "until the city is more calm, and not before the elections for the National Assembly." His close advisors urged him to stay and try to take power, but he wanted to show his prudence and loyalty to the Republic; while his advisors remained in Paris, he returned to London on 2 March 1848, and watched events from there.
The Revolution of February 1848, which forced King Louis Philippe I to abdicate, opened the way for Louis Napoleon to return to France and to run for the National Assembly.
He did not run in the first elections for the National Assembly, held in April 1848, but three members of the Bonaparte family, Jérôme Napoléon Bonaparte, Pierre Napoléon Bonaparte, and Lucien Murat were elected; the name Bonaparte still had political power. In the next elections, on 4 June, where candidates could run in multiple departments, he was elected in four different departments; in Paris, he was among the top five candidates, just after the conservative leader Adolphe Thiers and Victor Hugo. His followers were mostly on the left; from the peasantry and working class. His pamphlet on "The Extinction of Pauperism" was widely circulated in Paris, and his name was cheered with those of the socialist candidates, Barbès and Louis Blanc.
The conservative leaders of the provisional government, Lamartine and Cavaignac, considered arresting him as a dangerous revolutionary, but once again he outmaneuvered them. He wrote to the President of the Provisional Government: "I believe I should wait to return to the heart of my country, so that my presence in France will not serve as a pretext to the enemies of the Republic."
In June 1848, the June Days Uprising broke out in Paris, led by the far left, against the conservative majority in the National Assembly. Hundreds of barricades appeared in the working-class neighborhoods. General Cavaignac, the leader of the army, first withdrew his soldiers from Paris to allow the insurgents to deploy their barricades, and then returned with overwhelming force to crush the uprising; from 24 to 26 June, there were battles in the streets of the working class districts of Paris. An estimated five thousand insurgents were killed at the barricades; fifteen thousand were arrested, and four thousand deported.
His absence from Paris meant that Louis Napoleon was not connected either with the uprising, or with the brutal repression that had followed. He was still in London on 17–18 September, when the elections for the National Assembly were held, but he was a candidate in thirteen departments. He was elected in five departments; in Paris, he received 110,000 votes of the 247,000 cast, the highest number of votes of any candidate. He returned to Paris on 24 September, and this time he took his place in the National Assembly. In seven months, he had gone from an political exile in London to a highly-visible place in the National Assembly, as the government finished the new Constitution and prepared for the first election ever of a President of the French Republic.
(source)