There were three daughters of the King of Kashi - Amba, Ambika, and Ambalika. For their marriage, the King of Kashi organized a swayamvar (a ceremony where a woman chooses her husband from among several suitors). Meanwhile, when no bride could be found for Vichitravirya, the son of Queen Satyavati of Hastinapur, Bhishma abducted all three of them forcefully. Vichitravirya married both Ambika and Ambalika, but he left Amba because she loved King Shalva. However, when Shalva rejects Amba due to her abduction, Amba insists that Bhishma marry her.
But Bhishma had taken a vow of celibacy for life. So, Amba sought help from Bhishma's guru, Parashurama. However, Bhishma couldn't break his vow, leading to a conflict between him and Parashurama. Bhishma still didn't marry Amba. Then, Amba did severe penance on the banks of the river Ganga for twelve years to seek revenge on Bhishma. However, Ganga, in the form of a river, appeared and told her that she would never succeed and would instead become a river herself. But Amba persisted and did intense penance to Lord Shiva. Pleased with her devotion, Shiva granted her a boon that she would be the cause of Bhishma's death. On the other hand, King Drupad of Panchala was not having any children. When he prayed to Lord Shiva, Shiva told him that he would first have a daughter who would later transform into a man. When Drupad's wife gave birth to a daughter (Shikhandini), she was raised as a son and later married to the daughter of King Hiranyavarma.
But later, the family found out that Shikhandini was not a man but a woman, leading to an invasion in the Panchal kingdom due to this deception. Angry and upset, Shikhandini went to live in the forest. Meanwhile, she met a Yaksha who got infatuated with her and expressed the desire to grant her a boon. Knowing Shikhandini's wish, the Yaksha granted her his masculinity, taking her femininity in return. When Kubera learned of this, he cursed the Yaksha to remain a woman forever and cursed Shikhandini to remain a man forever. However, when the Yaksha begged for forgiveness, Kubera told them the way to get rid of the curse: when Shikhandini died, she would regain her original form. Later, Shikhandini became the reason for Bhishma's death in the Mahabharata war.
The Untold Story of Mahabharata: The Mystery of Shikhandi Being Male and Female...