He was educated at a high school in Voronezh and studied law at the University of Moscow, in which he attended the lectures of Konstantin Kavelin and Timofey Granovsky. He brought out a series of articles about leading personalities of the 18th century. Being a progressive, he failed his final exams (because of the inspector (ревизор) Sergey Uvarov) and could not have a chair in the university of Moscow.
Luckily, he was appointed librarian in the Archives of Moscow in 1849 and stayed there for 13 years until 1862. In that year, he was dismissed because of the scandal provoked by his publishing of the Russian Popular Religious Legends, which were a ferocious satire of the Orthodox clergy.
After his dismissal, he had a lot of trouble finding a new job and was penniless. This didn't stop him from writing his big theoretical work (three tomes of 700 pages each): The Poetic Outlook of Slavs about Nature, which came out between 1865 and 1869.
Censured by the Imperial authorities for his contacts with Socialist Alexander Herzen and suffering from tuberculosis, Afanasyev ended his life in penury, forced to sell his library to enable himself to eat. He died in Moscow aged 45.
Afanasyev became interested in old Russian and Slav traditions and stories in the 1850s ("folklore" as an area of study did not exist at the time). His first scholarly articles - The Wizards and Witches, Sorcery in the Ancient Rus, Pagan Legends about the Buyan Island - drew upon the so-called Mythological school that treated legends and tales as a mine of information for the study of more ancient pagan mythology (see his definitive work on the subject The Poetic Outlook on Nature by the Slavs). In such an interpretation, he regarded the fairy tale Vasilisa the Beautiful as depicting the conflict between the sunlight (Vasilisa), the storm (her stepmother), and dark clouds (her stepsisters). A great archivist, his works provide copious information, evidence, documents, and passages of the old chronicles relating to Old Russian culture, history and tradition, as well as other Indo-European languages, folklore and legends, in particular German traditions (he knew to perfection German as well as all Slav languages and ancient ones).
In the early 1850s, being already known for his articles, Afanasyev began to think about a collection of folk tales. He was then asked by the Russian Geographical Society (ethnography section) of Saint Petersburg to publish the folktales archives that the Society had been in possession of for about ten years. These archives are at the start of his Collection. Afanasyev chose 74 tales out of these. He added to them the enormous collection of Vladimir Dal (about 1000 texts), from which he kept 148 numbers, finding the other ones too distorted, his own collection (of about 10 folktales from the Voronejh region), and a few other collections. He added already published tales (such as Maria Marievna, The Firebird and the grey wolf, and so on), a few tales coming from epic songs, stories about the dead, a few medieval satirical texts (such as The Shemiaka Sentence), and anecdotes.
He owes his prominent place in the history of Slavonic philology chiefly to these Russian Fairy Tales: eight fascicules, published between 1855 and 1863, and inspired by the famous collection of the Brothers Grimm. From the scientific point of view, his collection goes further. He had at his disposal a lot of contributors, he tried to give the source and place where the tale was told, he never tried to give any definitive version of a folktale: so, if he gathered 7 versions of one folk type, he edited them all (this is the case for The FireBird for instance). His collection was ahead of his time.
Afanasyev edited a compilation of his collection for children comprising a set of animal, magic and humorous tales; Russian Folk Religious Legends which was banned due to the harsh censorship in the Russian Empire (the church thought the collection was blasphemous); and Russian Forbidden Tales, an assortment of unprintable tales that had to be published in Switzerland anonymously. Their obscene and anticlerical subject matter made their publication in Imperial Russia unthinkable.
Prior to Afanasyev's works in the 1850s, only a few attempts had ever been made to record or study the folk beliefs of peasant Russia. Though written Church Slavonic had existed since the 10th century, it was used almost solely by the church and only for parochial written works. It was not until the 18th and 19th centuries that a sizable body of secular literature developed in vernacular Russian. Thus, Afanasyev's collections made a highly valuable contribution to the dissemination and legitimization of Russian culture and folk belief. The influence of these folk tales can be seen in the works of many writers and composers, notably Nikolai Rimsky-Korsakov (Sadko, The Snow Maiden) and Igor Stravinsky (The Firebird, Petrushka, and L'Histoire du soldat).