When Shikhandi was Amba he was granted a boon by lord Shiv that he will kill Bhishma one day . But to do that she needs to be a male . So amba was to be born a male in her next birth.At the same time Drupad prayed to Shiv to give him a son who will kill Bhishma . So lord Shiv gives him a strange boon and that is that Drupads will first a female child and then a male child who will be responsible for Bhishma death
Drupad accepts this boon and very soon Shikhandini is born .Drupad knew she will be a male soon so he raises his daughter as a son .Unfortunate for him when she reaches the marriageable age she is still a female and because Drupad has told everybody it’s a boy he is forced to marry her to another woman .
Drupad gets daughter of King Hiranyavarman married to Shikhandini .However the secret comes out and Hiranyavarman decides to wage a war against Drupad .Drupad is sure that he is done for and Shikhandini flees to the forest where in a Yaksha mansion she performs intense penance .
Yaksha asks her why a beautiful lady like her is doing such tough penance and Shikhandini narrates her situation and asks the Yaksha to make her a man .Yaksh exchanges his sex with Shikhandini and she becomes Shikhandi .Now that he is a man King Hiranyavarman retreates thinking these were all rumours .Later Shikhandi has a son named Kshatrdev who is killed in the war .Shikhandi is underrated because he was the only one person who was not defeated by anyone in the war . Shikhandi was only killed on the 18 th night of the war when supposedly Ashwattama raided the pandav camp and killed pandavs sons .