Born in 1844, Rimsky-Korsakov studied the piano as a child but chose a naval career, entering the College of Naval Cadets in St. Petersburg in 1856. However, he continued with piano lessons; in fact, in 1859, Rimsky-Korsakov started working with the French pianist Theodore Canille, through whom he met Balakirev, an important mentor and friend.
In 1862, after graduating form the naval school, Rimsky-Korsakov was at sea for two and a half years, devoting his free time to composition. Upon Rimsky-Korsakov's return to St. Petersburg, in 1865, Balakirev conducted his friend's First Symphony, which was hailed as the first important symphonic work by a Russian composer.
Rimsky-Korsakov was appointed professor of composition and orchestration at the St. Petersburg Conservatory in 1871. The following year, he married Nadezhda Purgold, a pianist. In 1873, Rimsky-Korsakov left active duty, becoming inspector of navy orchestras, a job which he held until 1884.
During the 1870s, Rimsky-Korsakov composed, conducted, and collected Russian folk songs. In 1878, he started composing the opera May Night, after a story by Nikolai Gogol, his first stage work based on a story containing fantastic motifs. Following the production of May Night, in 1880, Rimsky-Korsakov began work on Snow Maiden, based on Nikolai Ostrovsky's poetic retelling of a Slavic myth, which was performed in 1882.
Saddened by Mussorgsky's death, in 1881, Rimsky-Korsakov devoted himself to editing his friend's unpublished manuscripts. A master orchestrator, Rimsky-Korsakov felt obliged to help colleagues whose manuscripts needed revision. Thus, in 1887, when Borodin died, Rimsky-Korsakov agreed to orchestrate and complete Borodin's opera Prince Igor. Rimsky-Korsakov wrote the Spanish Capriccio in 1887, completing the Russian Easter Overture and Sheherazade the following year. Having composed these resplendent works, however, Rimsky-Korsakov went through a period of despondency; there were deaths in his family, and, in 1893, Tchaikovsky died.
In 1895, Rimsky-Korsakov's Christmas Eve, another opera after a Gogol story, was produced. The composer's subsequent works recreated the rich world of Russian myths and legends. Sadko, completed in 1896, conjured up a medieval Russian legend. In 1901, Rimsky-Korsakov blended the legend of Kitezh and the story of St. Fevroniya to create a complex Christian-pantheistic narrative. Completed in 1905, the year when the politically progressive composer was temporarily dismissed from this teaching post, The Legend of the Invisible City of Kitezh and the Maiden, was produced in 1907.
Rimsky-Korsakov's last opera, The Golden Cockerel, completed in 1907, was inspired by a politically subversive story by Alexander Pushkin. The production of this work was a struggle, because the subject matter aroused suspicions among government censors. The opera was finally produced, in 1909, the year following the composer's death, by a private opera company in Moscow.