The Harivamsa (Sanskrit: हरिवंश Harivamśa, literally "the genealogy of Hari") is an important work of Sanskrit literature, containing 16,374 shlokas, mostly in the anustubh metre. The text is also known as the Harivamsa Purana. This text is believed to be a khila (appendix or supplement) to the Mahabharata and is traditionally ascribed to Vyasa. The most celebrated commentary of the Mahabharata by Neelakantha Chaturdhara, the Bharata Bhava Deepa also covers the Harivamsa. According to a traditional version of the Mahabharata, the Harivamsa is divided into two parvas (books) and 12,000 verses. These are included with the eighteen parvas of the Mahabharata. The Critical Edition has three parvas and 5,965 verses.
The Adi Parva of describes the creation of the cosmos and the legendary history of the kings of the Solar and Lunar dynasties leading up to the birth of Krishna. Vishnu Parva recounts the history of Krishna up to the events prior to the Mahabharata. Bhavishya Parva, the third book, includes two alternate creation theories, hymns to Shiva and Vishnu and provides a description of the Kali Yuga. While the Harivamsa has been regarded as an important source of information on the origin of Vishnu's incarnation Krishna, there has been speculation as to whether this text was derived from an earlier text and what its relationship is to the Brahma Purana, another text that deals with the origins of Krishna.
The bulk of the text is derived from two traditions, the pañcalakṣaṇa tradition, that is, the five marks of the Purana corpus one of which is the vaṃśa genealogy, and stories about the life of Krishna as a herdsman.
The text is complex, containing layers that go back to the 1st or 2nd centuries BCE. The origin of this appendix is not precisely known but it is apparent that it was a part of the Mahabharata by the 1st century CE because "the poet Ashvaghosha quotes a couple of verses, attributing them to the Mahabharata, which are now only found in the Harivamsa" (Datta 1858).
Edward Washburn Hopkins considers the Harivamsa the latest parva of the Mahabharata. Hazra has dated the Purana to the 4th century CE on the basis of the description of the rasa lila in it. According to him, the Visnu Purana and the Bhagavata Purana belong to the 5th century CE and 6th century CE respectively. According to Dikshit, the date of the Matsya Purana is 3rd century CE. When we compare the biography of Krishna, the account of Raji, and some other episodes as depicted in the Harivaṃśa, it appears to be anterior to the former. Therefore, the Viṣṇu parva and the Bhaviṣya parva can be dated to at least the 3rd century CE.
By its style and contents, the Harivaṃśa parva appears to be anterior to the Viṣṇu parva and Bhaviṣya parva. The verses quoted by Asvaghosa belong to this parva. On this basis, we can safely assume the Harivaṃśa parva (except for the later interpolations) to be at least as old as the 1st century CE.
The Harivamśa is available in three editions. The vulgate text of the Harivamśa has total 271 adhyāyas (chapters), divided into three parvas, Harivaṃśa parva (55 chapters), Viṣṇu parva (81 chapters) and Bhaviṣya parva (135 chapters). The traditional edition contains 12000 shlokas (verses) 2 sub-parvas, the Harivamsa Parva (187 chapters) and the Bhavishya Parva (48 chapters) with a total of 235 chapters. The Critical Edition or CE (1969–71, Ed. P.L.Vaidya) is around a third (118 chapters in 6073 slokas) of this vulgate edition. Like the vulgate, the chapters in the CE are divided into three parvas, Harivaṃśa parva (chapters 1-45), Viṣṇu parva (chapters 46-113) and Bhaviṣya parva (chapters 114 -118). Vaidya suggests that even the CE represents an expanded text and proposes that the oldest form of Harivamśa probably began with chapter 20 (which is where Agni Purana 12 places its start) and must have ended with chapter 98 of his text.
The Harivamsa has been translated in many Indian vernacular languages; The vulgate version containing 3 books and 271 chapters has not been translated into English yet. The only English translation of the traditional version containing 2 sub-parvas (Harivamsa parva - 187 chapters and Bhavishya parva - 48 chapters, a total of 235 chapters) is by Manmatha Nath Dutt in 1897 and it is in the public domain. The critical edition has been translated into English twice so far, once in 2016 by Bibek Debroy and by Simon Brodbeck in 2019.
It has been translated into French by M. A. Langlois,1834–35.