He was sent as an ambassador to the court of Chandragupta Maurya, the founder of the Mauryan Empire in India. During his time in India, Megasthenes compiled his observations and experiences, which he later wrote down in his book, Indika.
While the book itself is lost, fragments of it have been preserved in the writings of later authors, providing valuable insights into ancient Indian society, culture, and politics.