Who was Ashtavakra? I have heard that he was nachiketa's brother and was having great knowledge. What is his story?
I do not know that Ashtavakra is the brother of Nachiketa but the story of Ashtavakra is described in Mahabharat :
The sage Uddalaka had a disciple named Kahoda of subdued passions, and entirely devoted to the service of his preceptor and who had continued his studies long. The Brahmana had served his tutor long, and his preceptor, recognising his service, gave him his own daughter, Sujata, in marriage, as well as a mastery over the Shastras. And she became with child, radiant as fire. And the embryo addressed his father while employed in reading, 'O father, thou hast been reading the whole night, but (of all that) thy reading doth not seem to me correct. Even in my fetal state I have, by thy favour, become versed in the Shastras and the Vedas with their several branches. I say, O father, that what proceeds from thy mouth, is not correct.' Thus insulted in the presence of his disciples, the great sage in anger cursed his child in the womb, saying, 'Because thou speakest thus even while in the womb, therefore thou shalt be crooked in eight parts of the body.' The child was accordingly born crooked, and the great sage was ever after known by the name of Ashtavakra.