Lord Brahma having five faces is mentioned in various Puranas. However, the story of how he eventually lost the fifth head is being (apparently) told in different ways in the different Puarnas.
Here is a reference from the Brahma Purana:
Years ago, there was a war between the gods and the demons and the
gods came to Brahma for advice and Brahma asked them to pray to Shiva.
When Shiva appeared before them, the gods said, The demons have
defeated us. Please kill them and save us.
Shiva went to fight with the demons. He drove the demons off from
Mount Sumeru and out of heaven. He pursued them to the ends of the
earth. All this exertion made Shiva sweat. And wherever the drops of
sweat fell down on the ground, terrible ogresses named matris were
created. The matris also started to kill the demons and pursued them
down to the underworld.
While the matris were killing the demons in the underworld, Brahma and
the other gods waited on the banks of the river Goutami Ganga. This
place came to be known as Pratishthana.When the matris had killed all
the demons, they returned to earth and began to live on the banks of
the Goutami Ganga. This tirtha has come to be known as matritirtha.
Brahma used to have five heads. The fifth head was in the shape of a donkey’s head. When the demons were running away to the underworld,
this donkey’s head addressed the demons and said, Why are you running
away? Come back and fight with the gods. I shall aid you in your
The gods were alarmed at this paradoxical situation. Brahma was
helping them in their fight with the demons and Brahma’s fifth head
was trying to help the demons. They went to Vishnu and said, Please
cut off Brahma’s fifth head. It is causing too much of confusion.
I can do what you want, replied Vishnu, but there is a problem. When
the cut-off head falls on earth, it will destroy the earth. I think
you should pray to Shiva to find a way out.
The gods prayed to Shiva and Shiva agreed to cut off the head. But
what was to be done with the severed head? The earth refused to bear
it and so did the ocean. Finally it was decided that Shiva himself
would bear the head.
And, here is a reference from Matsya Purana:
Shatarupa is also referred to as Savitri, Gayatri, Sarasvati or
Brahmani. Since she had been born from Brahma’s body, she was like
Brahma’s daughter. In fact, Vashishtha and the other sages who were
Brahma’s sons welcomed her as their sister. But Shatarupa was so
beautiful that Brahma fell in love with her and wished to marry her.
Shatarupa circled Brahma and showed her respects to him. When she
stood in front of him. Brahma gazed upon her with the face that he
had. But when she went and stood behind him, Brahma could see her no
longer. (Brahma, obviously, did not want to turn his head.) Another
head with another face therefore sprouted behind Brahma’s first head
so that he might be able to see Shatarupa. In similar fashion, a head
sprouted to Brahma’s first head so that he might be able to see
Shatarpa. In similar fashion, a head sprouted to Brahma’s right an
another one to his left. And when Shatarupa rose above him, a head
sprouted towards the top as well. Thus it was that Brahma came to
have five heads and five faces.