The Ashtavakra Gita, or the Ashtavakra Samhita as it is sometimes called, is a very ancient Sanskrit text. Nothing seems to be known about the author, though tradition ascribes it to the sage Ashtavakra; hence the name.
There is a story about Ashtavakra while he was not born yet and inside his mothers womb he heard someone close by explaining
scriptures erroneously, unable to bear that any more, he was just turning himself here and there inside the mother’s belly. Hence his body contorted in eight places. When he was born he was named thus Ashta (eight) vakra (contorted). When he reached the age of twelve he learnt that his father had been taken prisoner by the famous king Janaka, who was the father of Sita of Ramayana and father in law of Sri Rama. The reason for the imprisonment was that his father was unable to answer the questions raised by the king but already he has promised the king he is capable to answer them.
Immediately knowing this Ashta Vakra went to the king and demanded the father of his to be released from the prison. This was refused by the king. Then the king told Ashta Vakra the reason for his father’s imprisonment. Ashta vakra then offered to answer all the questions on condition his father must be released. This famous discussion has later turned into this Gita or Samhitha. This is the story behind this work.