His mother gave him piano lessons, and at nine he played a Field concerto before an audience in his parents' house. In 1852 he entered the Guards' cadet school in St Petersburg. Although he had not studied harmony or composition, in 1856 he tried to write an opera; the same year he entered the Guards. In 1857 he met Dargomïzhsky and Cui, and through them Balakirev and Stasov. He persuaded Balakirev to give him lessons and composed songs and piano sonatas.
In 1858 Mussorgsky passed through a nervous or spiritual crisis and resigned his army commission. A visit to Moscow in 1859 fired his patriotic imagination and his compositional energies, but although his music began to enjoy public performances his nervous irritability was not entirely calmed. The emancipation of the serfs in March 1861 obliged him to spend most of the next two years helping manage the family estate; a symphony came to nothing and Stasov and Balakirev agreed that 'Mussorgsky is almost an idiot'. But he contiuned to compose and in 1863-6 worked on the libretto and music of an opera, "Salammbô", which he never completed. At this time he served at the Ministry of Communications and lived in a commune with five other young men who ardently cultivated and exchanged advanced ideas about art, religion, philosophy and politics. Mussorgsky's private and public lives eventually came into conflict. In 1865 he underwent his first serious bout of dipsomania (probably as a reaction to his mother's death that year) and in 1867 he was dismissed from his post.
Mussorgsky spent summer 1867 at his brother's country house at Minkino, where he wrote, among other things, his first important orchestral work, "St. John's Night on the Bare Mountain". On his return to St. Petersburg in the autumn Mussorgsky, like the other members of the Balakirev-Stasov circle (ironically dubbed the 'Mighty Handful'), became interested in Dargomïzhsky's experiments in operatic naturalism. Early in 1869 Mussorgsky re-entered government service and, in more settled conditions, was able to complete the original version of the opera "Boris Godunov". This was rejected by the Mariinsky Theatre and Mussorgsky set about revising it. In 1872 the opera was again rejected, but excerpts were performed elsewhere and a vocal score published. The opera committee finally accepted the work and a successtul production was mounted in February 1874.
Meanwhile Mussorgsky had begun work on another historical opera, "Khovanshchina", at the same time gaining promotion at the ministry. Progress on the new opera was interrupted partly because of unsettled domestic circumstances, but mainly because heavy drinking left Mussorgsky incapable of sustained creative effort. But several other compositions belong to this period, including the song cycles "Sunless" and "Songs and Dances of Death" and the "Pictures at an Exhibition", for piano, a brilliant and bold series inspired by a memorial exhibition of drawings by his friend Victor Hartmann. Ideas for a comic opera based on Gogol's "Sorochintsy Fair" also began to compete with work on "Khovanshchina"; both operas remained unfinished at Mussorgsky's death. During the earlier part of 1878 he seems to have led a more respectable life and his director at the ministry even allowed him leave for a three-month concert tour with the contralto Darya Leonova. After he was obliged to leave the government service in January 1880, Leonova helped provide him with employment and a home. It was to her that he tumed on 23 February 1881 in a state of nervous excitement, saying that there was nothing left for him but to beg in the streets; he was suffering from alcoholic epilepsy. He was removed to hospital, where he died a month later.
Many of Mussorgsky's works were unfinished, and their editing and posthumous publication were mainly carried out by Rimsky-Korsakov, who to a greater or lesser degree 'corrected' what Mussorgsky had composed. "Boris Godunov", in particular, was reshaped and repolished, with drastic cuts, wholesale rewriting and rescoring, insertion of new music and transposition of scenes. It was only many years later that, with a return to the composer's original drafts, the true nature of his rough art could be properly understood, for Mussorgsky shared with some of the painters of his day a disdain for formal beauty, technical polish and other manifestations of 'art for art's sake'. His desire was to relate his art as closely as possible to life, especially that of the Russian masses, to nourish it on events and to employ it as a means for communicating human experience.