The Sand Child is not told in chronological order and instead has a unique narrative structure. The text opens with a frame narrative, where the protagonist Ahmed is elderly. She is in seclusion and is described as looking very old. Although we later discover that Ahmed is a woman, she is referred to as "he" in the frame narrative.
The main narrative then begins, as the storyteller continues with the story. Ahmed is now dead, and the storyteller is reading from her journal, in order to find out who Ahmed really was. The storyteller claims that "the secret was there, in those pages, woven out of syllables and images." The narrative jumps back in time, to before Ahmed was born. Ahmed's father is lamenting the fact that he had so far only had daughters, and now wants a son. It is suggested that Ahmed's father is ashamed he has not yet had a son and is also frightened about what will happen after his death, as his fortune will surely be inherited by his younger brothers. He becomes obsessed with having a son and becomes involved with many superstitious behaviors such as using spells. However, when his wife gives birth to a baby girl, he is not impressed.
As a solution, Ahmed's father decides to pretend that his daughter is actually a boy, and to bring her up accordingly. Ahmed is therefore raised as a boy, and is given much positive attention due to her perceived gender. Throughout her life, Ahmed struggles to conceal her body, and any physical signs that she might be a woman, which leads to a strong sense of misery and repression. Ahmed later marries her cousin Fatima, who learns of Ahmed's secret and has to accept her unconventional relationship. Fatima feels miserable in her unfulfilling marriage, and dies due to stress and neglect. After this, Ahmed enters seclusion.
Meanwhile, the storytellers of the story argue, accusing the first storyteller of not telling the story right. The second storyteller takes over the story and tells the next part of the story, about Ahmed's seclusion and wanderings. One account is that Ahmed joined a circus, rejecting her false male identity and becoming a woman called Zahra. We then hear different accounts from members of the audience, called Salem, Amar, and Fatuma. These stories all have different endings, and it is not clear which account is true. The novel then ends with the perspective of a blind troubadour, who continues the story up until Ahmed's death.