After the fall of Napoleon, he retired to Italy, adopted his pseudonym and started to write books on Italian painting, Haydn and Mozart, and travels in Italy. In 1821 the Austrian police expelled him from the country, and on returning to Paris he finished his book De l’amour. This was followed by Racine et Shakespeare, a defense of Romantic literature. Le Rouge et le noir was his second novel, and he also produced or began three others, including La Chartreuse de Parme and Lucien Leuwen. None of his published works was received with any great understanding during his lifetime.
Beyle was appointed Consul at Civitavecchia after the 1830 revolution, but his health deteriorated and six years later he was back in Paris and beginning a Life of Napoleon. In 1841 he was once again recalled for reasons of illness, and in the following year suffered a fatal stroke. Various autobiographical works, Journal, Souvenirs de l’egotisme and La Vie de Henri Brulard, were published later, as his fame grew.