His writings were all in Sanskrit. Dain's account of his life in Avantisundar? states that he was a great-grandson of D?modara, a court poet from Vidarbha who served, among others, the Pallava king Si?haviu and King Durvin?ta of the Western Ganga dynasty:
D?modara was married in K?ñc? and fathered three sons; his middle-born, Manoratha, had four sons; Manoratha's youngest son, V?radatta, married a Brahmin woman, Gaur?, and they had several daughters and, eventually, a son, Dain. Dain then reports that he lost his mother at the age of seven and his father shortly thereafter, and that as an orphan, he had to flee K?ñc? because of an enemy invasion and was able to return only once peace was restored.
Yigal Bronner concludes that 'These details all suggest that Dain's active career took place around 680-720 CE under the auspices of Narasi?havarman II R?jasi?ha in K?ñc? (r. 690/1-728/9)'. A range of evidence points to an association with the Pallava dynasty and its court at Kanchipuram in what became Tamil Nadu.
Dain was widely praised as a poet by Sanskrit commentators such as Rajashekhara (fl. 920 CE), and his works are widely studied. One shloka (hymn) that explains the strengths of different poets says: ? (daina? padal?litya?: "Dain is the master of playful words").
Dain's works are not well preserved. He composed the now incomplete Da?akum?racarita, and the even less complete Avantisundar? (The Story of the Beautiful Lady from Avanti), in prose. He is best known for composing the K?vy?dar?a ('Mirror of Poetry'), the handbook of classical Sanskrit poetics, or K?vya, which appears to be intact. Debate continues over whether these were composed by a single person, but 'there is now a wide consensus that a single Dain in authored all these works at the Pallava court in K?ñc? around the end of the seventh century'.
The K?vy?dar?a is the earliest surviving systematic treatment of poetics in Sanskrit. K?vy?dar?a was strongly influenced by Bhai's Bhaik?vya. In K?vy?dar?a, Dain argues that a poem's beauty derives from its use of rhetorical devices – of which he distinguished thirty-six.
He is known for his complex sentences and creation of long compound words (some of his sentences ran for half a page, and some of his words for half a line).
The K?vy?dar?a is similar to and in many ways in disagreement with Bh?maha's K?vy?la?k?ra. Although modern scholars have debated who was borrowing from whom, or responding to whom, Bh?maha appears to have been earlier, and that Dain was responding to him. By the tenth century, the two works were apparently studied together, and seen as foundational works on Sanskrit poetry.
Da?akum?racarita is a prose text that relatesthe vicissitudes of ten princes in their pursuit of love and power. It contains stories of common life and reflects Indian society during the period, couched in colourful Sanskrit prose. It consists of (1) P?rvaphik?, (2) Da?akum?racarita Proper, and (3) Uttaraphik?.
Overlapping in content with the Da?akum?racarita and also attributed to Dain is the even more fragmentary Avantisundar? or Avantisundar?kath? (The Story of the Beautiful Lady from Avanti). Its two fragmentary manuscripts tell a story that is reflected by a later, fragmentary Sanskrit poem, the Avantisundar?kath?s?ra (Gist of the Story of the Beautiful Lady from Avanti) and a fragmentary thirteenth-century Telugu translation.
The two texts may represent separate compositions on the same theme by the same author, or are parts of one prose work by Dain that was broken up early in its transmission.