Devi Shailputri started penance to please Lord Shiva since her childhood. She prayed for twelve years, which was followed by another 64 years austerity and penance to please Lord Shiva.
The king Himalayaraj got worried about the future of her daughter. When Narada Muni came to see Shailputri, he lied and told that he has brought the marriage proposal for his daughter on behalf of Lord Vishnu. Himalayaraj promised Lord Narada that he would marry his daughter to Lord Vishnu. Lord Vishnu also accepted to marry Goddess Shailputri on the request of Narada Muni.
When Shailputri came to know about the promise of her father to get her married with Lord Vishnu, she left the home with her friend. She went to thick forest and lived in a cave near the river while penancing to please Lord Shiva. At last Lord Shiva got pleased and promised that He would marry her. The next day Shailputri and her friend observed fast for Lord Shiva which was the day of Shukla Paksha Tritiya during Bhadrapada month.
King Himalayaraj was worried for her daughter as he thought that someone has abducted his daughter. King Himalayaraj with his troop started searching for Shailputri everywhere. Finally he found his daughter and her friend in thick forest. He requested her daughter to return to home. Shailputri asked that she would return to home only if he promises to get her married with Lord Shiva. Himalayaraj agreed to her wishes later married her with Lord Shiva.
Due to this legend, this day is known as Hartalika as the friend of Goddess Parvati took her to the thick forest which Himalayaraj considered as abduction of his daughter. Hartalika word is combination of "Harat" and "Aalika" which means "abduction" and "female friend" respectively.