Miriam as a Child
Miriam first appears in the biblical book of Exodus not long after Pharaoh decrees that all newborn Hebrew boys will be drowned in the Nile river. Miriam's mother, Yocheved, has been hiding Miriam's infant brother, Moses, for three months. But as the child grows older Yocheved decides that it is no longer safe for him at home – after all, it would only take one ill-timed cry for an Egyptian guard to discover the child.
Yocheved puts Moses in a waterproofed wicker basket and places it in the Nile, hoping the river will carry her son to safety. Miriam follows at a distance and sees the basket float near Pharaoh's daughter, who is bathing in the Nile. Pharaoh's daughter sends one of her servants to fetch the basket from among the reeds and finds Moses when she opens it. She recognizes him as one of the Hebrew babies and feels sympathy for the child.
At this time Miriam emerges from her hiding place and approaches Pharaoh's daughter, offering to find a Hebrew woman to nurse the child. The princess agrees and Miriam brings none other than her own mother to care for Moses. "Take this baby and nurse him for me, and I will pay you," Pharaoh's daughter says to Yocheved (Exodus 2:9). Hence, as a result of Miriam's boldness Moses was raised by his mother until he was weaned, at which time he was adopted by the princes and became a member of the Egyptian royal family. (See "The Passover Story" for more information.)
Miriam at the Red Sea
Miriam does not appear again until much later in the Exodus story. Moses has commanded Pharaoh to let his people go and God has sent the ten plagues down upon Egypt. The former Hebrew slaves have crossed the Red Sea and the waters have crashed down upon the Egyptian soldiers that were pursuing them.
Moses leads the Israelite people in a song of praise to God, after which Miriam appears again. She leads the women in a dance while singing: "Sing to the Lord, for God is highly exalted. Both horse and driver God has hurled into the sea."
When Miriam is re-introduced in this part of the story, the text refers to her as a "prophetess" (Exodus 15:20) and later in Numbers 12:2 she reveals that God has spoken to her. Later, as the Israelites wander through the desert in search of the Promised Land, the midrash tells us that a well of water followed Miriam and quenched the people's thirst. It is from this part of her story that the relatively new tradition of Miriam's Cup at the Passover seder is derived.
Miriam Speaks Against Moses
Miriam also appears in the biblical book of Numbers, when she and her brother Aaron speak unfavorably about the Cushite woman Moses is married to. They also discuss how God has spoken to them too, implying that they are unhappy with the status quo between themselves and their younger brother. God overhears their conversation and calls the three siblings into the Tent of Meeting, where God appears as a cloud before them. Miriam and Aaron are instructed to step forward and God explains to them that Moses is different from other prophets:
"When there is a prophet among you,
I, the Lord, reveal myself to them in visions,
I speak to them in dreams.
But this is not true of my servant Moses;
he is faithful in all my house.
With him I speak face to face,
clearly and not in riddles;
he sees the form of the Lord.
Why then were you not afraid
to speak against my servant Moses?"
What God seems to be saying in this text is that whereas God appears to other prophets in visions, with Moses God speaks "face to face, clearly and not in riddles" (Numbers 12:6-9). In other words, Moses has a closer relationship with God than other prophets.
Following this encounter Miriam discovers that her skin is white and that she is afflicted with leprosy. Surprisingly, Aaron is not afflicted or punished in any way, though he too spoke against Moses. Rabbi Joseph Telushkin suggests this difference stems from the Hebrew verb used to describe their comments about Moses' wife. It is feminine – ve'teddaber ("and she spoke") – indicting that Miriam was the one who initiated the conversation against Moses (Telushkin, 130). Others have suggested that Aaron was not afflicted with leprosy because, as the High Priest, it would not have been seemly for his body to be touched by such a dreaded disease of the flesh.
Upon seeing Miriam's punishment Aaron asks Moses to speak to God on her behalf. Moses responds immediately, crying out to God in Numbers 12:13: "O Lord, please heal her" ("El nah, refah na lah"). God eventually heals Miriam, but first insists that she be exiled from the Israelite camp for seven days. She is shut outside the camp for the required period of time and the people wait for her. When she returns, Miriam has been healed and the Israelites move on to the Desert of Paran. Several chapters later, in Numbers 20, she dies and is buried at Kadesh.
References: Telushkin, Joseph. "Biblical Literacy: The Most Important People, Events and Ideas of the Hebrew Bible." William Morrow: New York, 1997.