Daniil Andreyev was the son of Leonid Andreyev, a prominent Russian writer of the start of the century; Maxim Gorky was his godfather. After the infant's mother, Alexandra (Veligorsky) Andreeva, died during childbirth, Leonid Andreev gave the infant Daniil to his late wife's sister, Elizabeth Dobrov, to raise. This act had two important consequences: it meant that when Leonid Andreev, like many other writers and intellectuals, left Russia after the 1917 Russian Revolution, his young son remained behind; it also meant that Daniil was raised in a household that remained deeply religious, in contrast to much of the Russian intelligentsia of the era.
Like many of his contemporaries, the boy Daniil had a pronounced literary bent; he began writing poetry and prose in early childhood. He graduated from high school but was not allowed to attend university, because of his "non-proletarian" background. He supported himself as a graphic artist and wrote in his spare time.
Daniil Andreev was enrolled into the Soviet Army in 1942. He served as a noncombatant, and during the Siege of Leningrad helped to transport supplies across Lake Ladoga. After World War II Andreev returned to civilian life, but was arrested by Soviet authorities in April 1947 and sentenced to 25 years of imprisonment, being accused of anti-Soviet propaganda and preparations to assassinate Stalin. He suffered a heart attack in prison in 1954, the first manifestation of the heart condition that would eventually cause his death. He was released in 1957, already terminally ill.
While in prison in Vladimir from 1947 to 1957, Andreev had mystic visions and started writing Roza Mira, finishing it after he was released. The book was known in the Soviet Union via Samizdat, but was first officially published only in 1991. In 1997, Roza Mira was published in English in the USA.
Almost all works that Andreev wrote before 1947, were destroyed by MGB as "anti-Soviet literature", including his novel Wanderers of Night (Russian: Странники ночи) about the spiritual opposition to the Soviet regime and atheism. Being imprisoned, however, Andreev managed to restore some of his poems. He also tried to restore Wanderers of Night, but he could only restore a few pages of it. Also some works of his childhood were kept by his friend, including his first poems written at the age of 8.
His main book, Roza Mira (Russian: Роза Мира, literally "The Rose of the World") contains a detailed description of numerous layers of spiritual reality that surround Earth, of the forthcoming religion called Roza Mira that will emerge and unite all people and states, and of the events of the future advent of Antichrist and his fall.
Apart from Roza Mira, he wrote a poem The Iron Mystery (Russian: Железная мистерия, published in 1990), a "poetic ensemble" (that is how he called it) Russian gods (Russian: Русские боги, full text published in 1995) and other works.