The novel centers around the friendship between Mariam and Laila. It is split into four parts, with a focus on Mariam in the first part, continuing Laila in the second and fourth, and the relationship between the two women in the third part. Mariam lives in a kolba on the outskirts of Herat with her embittered mother. Jalil, her father, is a wealthy man who lives in town with three wives and nine children. Because Mariam is his illegitimate daughter, she cannot live with them, but Jalil visits her every Thursday.
On her fifteenth birthday, Mariam wants her father to take her to see Pinocchio at his movie theater. When he does not show up, she hikes into town and goes to his house. He refuses to see her, and she ends up sleeping on the porch. In the morning, Mariam returns home to find that her mother has committed suicide out of fear that her daughter has deserted her. Mariam is then taken to live in her father’s house. Jalil arranges for her to be married to Rasheed, a shoemaker from Kabul who is thirty years her senior.
In Kabul, Mariam becomes pregnant seven successive times, but is never able to carry a child to term, and Rasheed gradually becomes more abusive. A girl named Laila and a boy named Tariq, who are close friends and aware of social boundaries, live in the same neighborhood. War comes to Afghanistan, and Kabul is bombarded by rocket attacks. Tariq’s family decides to leave the city, and the emotional farewell between Laila and Tariq ends with them making love.
Laila’s family also decides to leave Kabul, but as they are packing a rocket destroys the house, kills her parents, and severely injures Laila. Laila is taken in by Rasheed and Mariam. After recovering from her injuries, Laila discovers that she is pregnant with Tariq’s child. After learning that Tariq is dead, she agrees to marry Rasheed, who is eager to have a young and attractive second wife, and hopes to have a child with her. When Laila gives birth to a daughter, Aziza, Rasheed is displeased and suspicious, and he soon becomes abusive toward Laila.
Mariam and Laila eventually become confidantes and best friends. They plan to run away from Rasheed and leave Kabul, but they are caught at the bus station. Rasheed beats them and deprives them of water for several days, almost killing Aziza. A few years later, Laila gives birth to Zalmai, Rasheed’s son. The Taliban has risen to power, and there is a drought, and living conditions in Kabul become poor. Rasheed’s workshop burns down, and he is forced to take jobs for which he is ill-suited.
Rasheed sends Aziza to an orphanage. Then one day, Tariq appears outside the house. He and Laila are reunited, and their passions flare anew. When Rasheed returns home from work, Zalmai tells his father about the visitor. Rasheed starts to savagely beat Laila. He nearly strangles her, but Mariam intervenes and kills Rasheed with a shovel. Afterwards, Mariam confesses to killing Rasheed, in order to draw attention away from Laila and Tariq, and is executed, while Laila and Tariq leave for Pakistan with Aziza and Zalmai.
After the fall of the Taliban, Laila and Tariq return to Afghanistan. They stop in the village where Mariam was raised, and discover a package that Mariam’s father left behind for her: a videotape of Pinocchio, a small pile of money and a letter. Laila reads the letter and discovers that Jalil regretted sending Mariam away. Laila and Tariq return to Kabul and fix up the orphanage, where Laila starts working as a teacher. Laila is pregnant with her third child, and if it is a girl, Laila has already named her.