When Brahma was creating the universe, he made a female deity known as Shatarupa . According to the Matsya Purana, Shatarupa was known by different names, including Satarupa, Sarasvati, Sandhya, or Brahmi.
Hindu mythology uses her story to explain Brahma’s four heads. When Brahma created Shatarupa, he was immediately infatuated and pursued her wherever she went. Shatarupā moved in various directions to avoid his gaze but wherever she went, Brahmā developed another head until he had four, one for each direction of the compass. Desperate, Shatarupa leaped over him to stay out of his gaze even for a moment. A fifth head, however, appeared above the others. Thus, Brahmā developed five heads. At this moment Shiva appeared, cut off the top head and determined that since Shatarupā was Brahma’s daughter (being created by him), it was wrong and incestous of Brahma to become obsessed with her. He directed that there be no proper worship in India for the “unholy” Brahma. Thus, only the other two Gods of the Trimurti, Vishnu and Shiva continue to be worshipped, while Brahma is almost totally ignored. Ever since the incident, Brahma has been reciting the four Vedas, one from every mouth, in his attempt at repentance.
Another version of the story describes Shatarupa as a deity with beauty in many forms. After Brahma had grown his fifth head Shatarupa had turned into a cow to avoid his lust. When Brahma found out he turned into a bull in order to continue to follow Shatarupa, eventually finding her. She hid in the form of another animal in order to quell his unnatural lust. But, alas, Brahma found out again and incarnated as the appropriate male animal. Again, she hid in the form of another animal. This continued until all of the animals of all kinds in today’s world were born and Shiva finally ripped off one of Brahma’s five heads to put an end to his lust.