Born in Grenoble, France, he had a miserable childhood in stifling provincial France but blossomed in the military and theatrical worlds of the First French Empire. He travelled extensively in Germany and visited Russia (as part of Napoleon's army), but formed a particular attachment to Italy, where he spent much of the remainder of his career, serving as French consul and writing.
Beyle used the pseudonym "Stendhal", supposedly chosen as an anagram of "Shetland" (although Georges Perec may have invented this explanation - references to Le Rouge et le Noir feature extensively in Perec's unfinished last novel 53 jours). --- Alternative explanation: some scholars believes he borrowed his nom de plume from the german city of Stendal.
Contemporary readers did not fully appreciate Stendhal's realistic style during the Romantic period in which he lived; he was not fully appreciated until the beginning of the 20th century. He dedicated his writing to "the Happy Few", referring to those who would one day recognise his own genius. Today, Stendhal's works attract attention for their irony and psychological and historical aspects.
Stendhal was an avid fan of music, particularly the composers Cimarosa, Mozart, and Rossini, the latter of whom he wrote an extensive biography, Vie de Rossini (1824), now more valued for its wide-ranging musical criticism than its historical accuracy.
Stendhal's brief, saucy memoir, Souvenirs d'Egotisme (Memoirs of an Egotist) was published posthumously in 1892.