The composer wrote the words (the libretto) himself. It was based on a play by Aleksandr Pushkin. Mussorgsky also read a famous book on the history of Russia: Nikolay Karamzin's "History of the Russian State" and used some of the historical material from this book.
ð ə WORD_BOUNDARY k ə m p oʊ z ə ɹ WORD_BOUNDARY ɹ oʊ t WORD_BOUNDARY ð ə WORD_BOUNDARY w ɜː d z WORD_BOUNDARY ð ə WORD_BOUNDARY l ɪ b ɹ ɛ t oʊ WORD_BOUNDARY h ɪ m s ɛ l f WORD_BOUNDARY ɪ t WORD_BOUNDARY w ʌ z WORD_BOUNDARY b eɪ s t WORD_BOUNDARY ɔ n WORD_BOUNDARY ʌ WORD_BOUNDARY p l eɪ WORD_BOUNDARY b aɪ WORD_BOUNDARY ʌ l ɛ k s æ n d ə ɹ WORD_BOUNDARY p ʊ ʃ k ɪ n WORD_BOUNDARY m ʌ s ɔ ɹ ɡ s k i WORD_BOUNDARY ɔ l s oʊ WORD_BOUNDARY ɹ iː d WORD_BOUNDARY ʌ WORD_BOUNDARY f eɪ m ə s WORD_BOUNDARY b ʊ k WORD_BOUNDARY ɔ n ð ə WORD_BOUNDARY h ɪ s t ə ɹ ɹ i WORD_BOUNDARY ʌ v WORD_BOUNDARY ɹ ʌ ʃ ə WORD_BOUNDARY n ɪ k ə l eɪ WORD_BOUNDARY k æ ɹ ʌ m z ɪ n z WORD_BOUNDARY h ɪ s t ə ɹ ɹ i WORD_BOUNDARY ʌ v ð ə WORD_BOUNDARY ɹ ʌ ʃ ə n WORD_BOUNDARY s t eɪ t WORD_BOUNDARY æ n d WORD_BOUNDARY j uː z d WORD_BOUNDARY s ʌ m WORD_BOUNDARY ʌ v ð ə WORD_BOUNDARY h ɪ s t ɔ ɹ ɪ k ə l WORD_BOUNDARY m ə t ɪ ɹ i ə l WORD_BOUNDARY f ɹ ʌ m WORD_BOUNDARY ð ɪ s WORD_BOUNDARY b ʊ k WORD_BOUNDARY