Mahdy is a young boy living in a village in Morocco with his mother who tries to take care of him, especially after his father traveled away. His mother always sends him to the market to buy groceries.
Mahdy is a good student but he gets bullied by his classmates who are jealous of him. Mahdy's mother, Aisha, misses her husband and tries to sell animals to earn money. When she goes to the beach with Mahdy, someone steals her purse that has all her money.
Aisha is glad after she finds her purse. Mahdy writes a letter to his father, while Aisha reminisces about her memories with him. Aisha's brother-in-law tells her that Muhammad has died.
Aisha goes with Mahdy to pick up her husband's body and bury him. Qasim asks to go with her but she refuses.
Qasim's wife wants to find out about the inheritance that Muhammad left. It's revealed in Muhammad's will that Mahdy is not his biological son, but was rather adopted.
Muhammad leaves half of his possessions to his son Mahdy, and the rest is distributed between Aisha and his brother, but Qasim's wife asks him to try to find a way to seize the inheritance. Mahdy is sad when he finds out the truth.
Aisha tells Mahdy about how she found him as a baby and she took him in and raised him. He asks to know his real parents, as his uncle's wife starts treating him badly.
Qasim's wife beats Mahdy, and Aisha tries to hide all the documents that belonged to her late husband with her friend, Hada. Qasim tries to get close to Aisha.
Qasim seizes all the inheritance to himself and gives it to his wife and kids. Mahdy escapes to the city with empty pockets. Aisha frantically looks for Mahdy.
Mahdy runs away with a boy who steals his shoes and toy. A man named Mahmoud gives him food and a place to sleep, while his mother persists in looking for him.
Mahdy works with the old man in the markets and folk festivals, he sings and plays the oud while a monkey plays around. Aisha goes mad and lives in the stable while she dreams of her son coming home to her.
The police arrest the old man, and Mahdy finds himself alone with the monkey as he hides on the rooftop of the neighbors' house. Hada takes Aisha for a walk after she finds her in a bad shape.
Mahdy gets tired of the city and takes the monkey and goes to the village. When Al-Tohamy's son sees Hada bringing a bag to Aisha, he tells his father who takes the bag from Hada. Aisha imagines having Mahdy in her arms.
Mahdy escapes from the children who wanted to steal the monkey and his money. A young girl in a wheelchair saves him and takes him to her home, and her mother invites him to have lunch with them. Mahdy's uncle puts an ad on the Internet to find out his real family.
Mahdy feels that the girl and her mother are his real family. After finding the ad on the Internet, Al-Tohamy goes to Mahdy's uncle and tells him that he's the one who found Mahdy and raised him. Mahdy's uncle gives him money in exchange for his silence.
Aida helps Mahdy create an account on Facebook and he calls it 'Rootless', he leaves this family and goes to meet Mahmoud after he's released from prison. A committee arrives to assess Aisha's condition, and Al-Tohamy tells them she's doing great.
Mahdy returns to work in carnivals on the streets, as Mahmoud falls sick. Al-Tohamy goes to the lawyer and claims that his own son is actually Mahdy.
Mahmoud takes Mahdy and the monkey and goes to his brother in the village. Mina quarrels with Al-Tohamy after he harasses Aisha.
Mahmoud dies after the long journey, and his brother buries him. Mahdy is saddened after the monkey runs away into the forest, and he decides to head to Marrakesh.
Mahdy goes to his mother, Aisha, and he's saddened that she has gone mad. Al-Tohamy and Mina treat him well, and he wonders how his mother ended up like this. Aida misses Mahdy.
Al-Tohamy gives Mahdy the address of his his real family, and he tells Aida all about it online.
Mahdy goes to the place where he worked with Mahmoud and he tells everyone that Mahmoud has died. Mahdy joins another boy in singing and dancing.
Mahdy goes to his friend's house, and Kabir tells Mahdy that the man uses children in stealing and begging. Mahdy is unable to leave because he thinks that he's his real father.
Mahdy shows the man's wife his clothes when he was a baby, and tells her that he's their son. The man wants to find Mahdy's real parents to take money from them.
Mahdy works with the other children in the drug trade, and the man starts to trust him and relies on him in robbing houses. A deranged man reminds Al-Tohamy that he seized Mahdy's inheritance.
The police raid the man's house and the officer finds a bag full of drugs and money. He arrests some of the children, but Mahdy and his friends manage to escape. The officer finds Mahdy's baby clothes.
Mahdy and his friend take a bus to Marrakesh. Aisha and Hada visit Al-Selmany, who is Mahdy's real father. Halim keeps them locked up till he finds Mahdy.
Halim's lawyer is able to find Mahdy's location, and he takes him to Halim as Mahdy tries to escape.
Kabir saves Mahdy from the lawyer, and the lawyer finds Mahdy's baby clothes in the car.
Mahdy finally reunites with his real mother and sister. His grandfather throws a big party in celebration of his return, and he thanks Halim for finding him. Al-Tohamy is imprisoned for killing his brother Abdullah.