Among several differing Puranic accounts of Ganesha's origin, the most widely known describes the goddess Parvati creating him from turmeric paste or clay she had used to cleanse herself, giving the figure life and setting him to guard the entrance to her private chambers while she bathed. When Shiva, Parvati's husband, returned and found this unfamiliar young guardian blocking his way and refusing him entry, not recognizing his own wife's creation, a confrontation followed in which Shiva, in anger, beheaded the boy.
Parvati's grief at her son's death is described as so severe that Shiva agreed to restore him to life, sending his attendants to bring back the head of the first creature they encountered facing a particular direction; they returned with the head of an elephant, which Shiva placed on the boy's body, restoring him to life as Ganesha, elephant-headed and now formally acknowledged as Shiva and Parvati's own son.
Other Puranic sources tell the story with variations, including versions in which Ganesha is created jointly by Shiva and Parvati rather than by Parvati alone, or in which the elephant head results from different circumstances entirely, reflecting the way Ganesha's popularity across regions and sectarian traditions produced multiple, coexisting origin narratives rather than a single fixed account.