Although Dostoevsky began his first notes for The Brothers Karamazov in April 1878, the novel incorporated elements and themes from an earlier unfinished project he had begun in 1869 entitled The Life of a Great Sinner. Another unfinished project, Drama in Tobolsk (Драма. В Тобольске), is considered to be the first draft of the first chapter of The Brothers Karamazov. Dated 13 September 1874, it tells of a fictional murder in Staraya Russa committed by a praporshchik named Dmitry Ilynskov (based on a real soldier from Omsk), who is thought to have murdered his father. It goes on to note that the father's body was suddenly discovered in a pit under a house. The similarly unfinished Sorokoviny (Сороковины), dated 1 August 1875, is reflected in book IX, chapter 3–5 and book XI, chapter nine.
In the October 1877 Writer's Diary article "To the Reader", Dostoevsky mentions a "literary work that has imperceptibly and involuntarily been taking shape within me over these two years of publishing the Diary." The Diary covered a multitude of themes and issues, some of which would be explored in greater depth in The Brothers Karamazov. These include patricide, law and order, and a variety of social problems.
The writing of The Brothers Karamazov was altered by a personal tragedy: in May 1878, Dostoevsky's 3-year-old son Alyosha died of epilepsy, a condition inherited from his father. The novelist's grief is apparent throughout the book. Dostoevsky named the hero Alyosha, as well as imbuing him with qualities that he sought and most admired. His loss is also reflected in the story of Captain Snegiryov and his young son Ilyusha.
The death of his son brought Dostoevsky to the Optina Monastery later that year. There he found inspiration for several aspects of The Brothers Karamazov, though at the time he intended to write a novel about childhood instead. Parts of the biographical section of Zosima's life are based on "The Life of the Elder Leonid", a text he found at Optina and copied "almost word for word."