Bramha’s four head represents 4 vedas,4 yugas.Bramha’s 5th head was ego.Lord Shiva cut Bramha’s ego .
There is lot of story related to this event .
In Hindu mythology, when Brahma was creating the universe, he made a female deity known as Shatarupa (literally śata-rūpā, she of a hundred beautiful forms). According to the Matsya Purana, Shatarupa was known by different names, including Satarupa, 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 incestuous 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.
According to Shiva Purana, at the beginning of time in Cosmos, Vishnu and Brahma
approached a huge Shiva linga and set out to find its beginning and end. Vishnu was appointed to seek the end and Brahma the beginning. Taking the form of a boar, Vishnu began digging downwards into the earth, while Brahma took the form of a swan and began flying upwards. However, neither could find His appointed destination. Vishnu, satisfied, came up to Shiva and bowed down to him as a swarupa of Brahman. Brahmā did not give up so easily. As He was going up, he saw a ketaki flower, dear to Shiva. His ego forced him to ask the flower to bear false witness about
Brahmā’s discovery of Shiva’s beginning. When Brahmā told his tale, Shiva, the all-knowing, was angered by the former’s ego. Shiva thus cursed him that no being in the three worlds will worship him.
According to another legend, Brahmā is not worshiped because of a curse
by the great sage Brahmarishi Bhrigu. The high priest Bhrigu was organizing a great fire-sacrifice (yajna) on Earth. It was decided that the greatest among all Gods would be made the presiding deity. Bhrigu then set off to find the greatest among the Trimurti. When he went to Brahmā, the god was so immersed in the music played by Saraswati that he could hardly hear Bhrigu’s calls. The enraged Bhrigu then cursed Brahma that no person on Earth would ever invoke him or worship him again.
According to the Puranas, Brahma and Vishnu were once arguing over who was
superior of the two. They discovered from the Vedas that Shiva was the Supreme Being. Brahma however, spoke disparagingly about Shiva. In anger, Shiva opened his fiery 3rd eye, and burnt off the head, which had spoken, and therefore Brahma was left with 4 heads.
Brahma originally possessed one Head. From a part of his own body, He created a woman Shatarupa (a face with 100 beauties). She is also known as Savitri, Brahmi, Saraswati (Goddess of Knowledge), Gayatri (the triple hymn or the Gayatri Mantra), Sandhya. And is the Consort of Lord Brahma.Brahma fell in love with his own female creation and could not take his eyes off her extraordinary beauty. Shatarupa felt shy and tried to evade his gaze by moving away on all sides. To follow her wherever
she moved, Brahma created his 5 heads.
He did it for good. 4 head of brahma represent 4 Yugas knowledge of 4 Vedas. The 5th was ego (one extra head of Brahma) which was representing anti-tune of the Vedas in order to attract Shiv’s attention to go from vairagya to day-to-day rituals.
Discussion with Narayana, he failed to understand the necessity of delaying the task to bring Shakti into Shiv’s life due to Shiv’s contribution to kickstart the universe. In due time, Shiv lost his nature (Shakti) & went Vairagya.
The act of Brahma representing his ego over the 4 vedas, forced Shiv to chop off his 5th head.
One such story says that Brahma created a woman named “Shatarupa” to help him with his job of creation. But Shatarupa was so beautiful that Brahma became completely infatuated with her and stared at her wherever she went. Shatarupa was embarrassed by this attention and tried to escape his gaze, but in every direction that she moved, Brahma sprouted a new head until he had developed four. The frustrated Shatarupa became desperate and began to jump to try to escape his gaze. This prompted Brahma to sprout yet another head on top of the others in order to keep her in sight.
It is said that Shiva admonished Brahma for his “unholy”
behavior towards Shatarupa and chopped off his fifth head as punishment. Brahma had given into the cravings of the flesh and abandoned the work of the soul and for this Shiva’s curse was that people should not worship Brahma.
The story also goes on to say that Brahma has been continually reciting the four Vedas ever since as a form of repentance, one from each of his four heads.