Lilith, so the story goes, was Adam's first wife. After an argument, she left him and so God created Eve. We all know what happened after that. But what of Lilith, the ex?
Lilith exists more as a collection of tales and incarnations than one person or character, which can make it hard to tell her story as one narrative with a beginning, middle, and end. But, perhaps the most common or best known story is what she did prior to and after leaving Eden. Unhappy with Adam, Lilith called out the name of God and flew into the sky. Adam, upset about being dumped, called out to God, and God sent three angels to find her. She was hanging out by the Red Sea and refused to return to the Garden, saying it was her duty to kill newborns. She struck a deal with the angels, agreeing not to harm any children who had a seal with the angels' names engraved upon it hanging by their beds.
This account is already a little confusing because when the angels find Lilith by the Red Sea she may or may not be giving birth to demons. Other accounts don't describe her offspring, and there's nothing in this narrative to suggest that Lilith was created to kill babies--that only comes up later with the angels. Further muddying the waters is this tidbit: Adam, newly single, had sex with a lilith demon and she bore male and female demons that populate the world.
Whether or not Lilith--any lilith--bore demons with or without Adam's help is beside the point. Lilith is, in fact, known as a demon who kills and/or eats babies. She's often likened to or associated with Lamashtu, a baby-eater of Babylonian myth and legend. Lamashtu was so awful that she was warded off using another demon, Pazuzu, who was made famous in The Exorcist.
Lilith's story, such as it is, begins in Mesopotamia. She's first mentioned in Gilgamesh and Huluppu-Tree, in which she and two other demons possess a tree. Gilgamesh defeats the demons and Lilith flees to the desert. Lilith's very name comes from the Sumerian word for female demons or wind spirits who live in the desert, lilitu. A related demon is ardat-lili. The lilitu are known to prey upon pregnant women and infants, so amulets were used to ward them off.
As many different cultures and traditions took root and grew throughout the 2nd and 1st millennium BCE, Lilith, along with any number of gods and demons, was appropriated by different groups and became a part of their religious, mythological, and literary traditions. She appears once in the Bible, in Isaiah 34, as part of a list of the terrible things that inhabit Edom, a wasteland. The passage dates to about 742-701 BCE, and since there's no description it stands to reason the lilith were well known at the time.
Jewish incantation bowls from the Sassanid period (226-636 CE) protect against Lilith.
Lilith, as Adam's first wife, doesn't appear until a couple hundred years later in the Alphabet of Ben Sira (800-1000 CE). In this story, Lilith is described as Adam's first partner who argued with him about equality. Displeased with how she was being treated, she left. This story made its way into Jewery and Christianity, and it is this independent and empowered Lilith that might be the most well-known incarnation and has since been appropriated by feminists. But Lilith leaving Adam is only half the story. Pronouncing the name of God is sinful, so no only is this Lilith undeserving of Paradise, she has dark powers which are made flesh when she flies away from the Garden on wings. She's destined to give birth to many generations, but her children are threatened with death--the angels sent to retrieve her say they'll kill one hundred of her offspring every day she does not return. Lilith, as noted, refuses to go back to Adam, and says she was made to kill babies, accepting the mantle or fate the angels have in store for her kids. But once the angels threaten to kill her also, she strikes a bargain. She'll hold back on the infanticide so long as the babies are warded against her.
In a related story, Lilith is on her way to kill and eat a baby when she runs into the prophet Elijah. After telling Elijah her plans, and revealing to him her names (she has a number of them) Elijah banishes her and invokes her names as protections against her. Like the amulets that bear the names of angels, amulets engraved with the names of Lilith will protect pregnant women and their babies.
The Zohar is a Kabbalisitic text written in the late 13th century, but which may reflect an earlier literary tradition. It, too, makes mention of Lilith. In it she's a succubus who breeds evil, which recalls older stories about Lilith as an evil spirit. The Zohar is also responsible for pairing Lilith with Samael/Asmodeus who is the male embodiment of evil. Fearful that Samael and Lilith will overrun the Earth with their demon brood, God castrates Samael. Frustrated, Lilith takes to seducing men in the night. In the Zohar, Adam is a victim of Lilith's seduction and lust. King Solomon is another victim. He falls for the Queen of Sheba, but when Solomon sees the queen's hairy legs, he knows he's been tricked.
Lilith or a Lilith-like being has been present in religion and folklore since forever, it seems. Although her origins and powers have changed some over time, she persists as a force of evil. Her re-casting as a feminist icon is a recent development in her long and storied history.