Here is the story of Madri, a lesser-known yet very integral character in Mahabharata.
Kunti had married Pandu as he impressed her in her Swayamvar and seemed to be the perfect suitor for her. Everyone accepted her as the queen. Pandu was a good friend of Shalya, whom he had met in an encounter. Bhishma thought that if Pandu marries the daughter of the Madra kingdom, they would become stronger in terms of strength, wealth, and army. Bhishma then approached Shalya who agreed to marry his sister Madri to Pandu but he could not simply give her without getting anything in exchange. Thus, Bhishma showered him with wealth, jewels, and gold. Pandu then married Madri.
Kunti was not very kind to Madri and always thought of her as a rival. Madri had similar thoughts about her co-wife. However, they two were always cordial and civil and knew how to be polite and noble. All the three people, Kunti, Madri, and Pandu left to the forest after Pandu renounced the world as he had wrongfully killed Sage Kindama and his wife while hunting. They went and lived in the jungle.
The three had lived their life and now they wanted sons to live with. However, the curse of Kidama always prevented them from bearing any children. On this note, Kunti reminded Pandu of her blessing that Sage Durvasa had given her. She could use the divine mantra and have children with Gods. Pandu consented to this idea and Kunti invoked the gods of Dharma, Shaurya, and Bala giving birth to Yudhisthir, Bhima, and Arjuna.
Madri saw this and was very jealous. She too wanted to be the mother of her own children. She shared her heart out with Pandu who understood her state of mind. Pandu then talked with Kunti and Kunti empathized with her. She gave her the divine mantra and allowed her to have children through it. Madri went ahead and invoked the Ashwini Gods and gave birth to Nakula and Sahadeva. Madri was still not very happy as she too wanted a third child. She requested Kunti again but Kunti refused as she felt deceived because Madri had invoked twin gods at once and gave birth to Twins instead of a single son. Madri had no choice but to be content with the children she had.
One day, it was the birthday of Arjuna when Brahmans were called to their stay and fed meals. Pandu went to the forest and was highly influenced by the blossoming spring beauty of it. Madri was also with him and they forgot his curse and attempted to make love. Pandu died due to the curse.
Kunti was highly upset and she too wanted to give away her life to go to heaven with Pandu. However, Madri stopped her and told her that if she left, Madri would not be able to take care of the children alone and would be partial towards her sons while Kunti can do that and take equal care of everyone. Hence, she went ahead and sacrificed herself to go to heaven with Pandu.