Broken into two parts, "Going Away" and "Coming Home," The Shadow Lines follows a young boy as he comes of age in Calcutta. He begins his story with his memories of his uncle Tridib, whose knowledge of history and geography enthralls him. He describes Tridib's various habits, including his somewhat distant manner with other people and frequent visits to a tea stand in Gole Park. The narrator then leaps forward in time and describes his visit with May Price, an old friend of Tridib's, linked by a familiar relationship between her father, Lionel Tresawsen, and his grandfather, Datta Chaudhuri. He attends a classical concert she is performing in and they catch up over dinner afterward. He gathers that she and Tridib were closer than he first assumed.
The narrator then pivots to describing his cousin Ila, comparing their earlier encounters as children to their later ones as teenagers. She is wealthier than the narrator and treats unfamiliar places and travel casually. She also shows an inclination to lie, making her life appear more glamorous or flattering than it actually is. In one instance, she tells the narrator that she is dating a boy in her class but he notices that they are never in a yearbook photo together, and that he has his arms around two different girls in one particular picture. Later he finds that she has torn this page out of the book. Ila's mother is called "Queen Victoria" by all the members of the narrator's family, as she is wealthier than they are and puts on airs. She is shown being rude to her staff. The narrator recounts her run-in with a crocodile.
The narrator also carefully illustrates the class distinctions that subtly divide the family. His mother wants to go on the trip on which Ila's mother has invited them, but his grandmother tells her not to ask for too much. His grandmother also comments that Tridib's father, Shaheb, is thoroughly Europeanized in a way that she finds distasteful. He then describes his uncle Robi, Tridib's younger brother, getting in trouble for fighting a boy at his school, but states that his grandmother looks upon it favorably, as he was defending a disabled child. She, in turn, launches into a long story about a student in her class at University who was arrested by the state police. She remembers that he showed no fear or hesitation and admires his determination. She wishes that she had known and been able to intervene, killing him before he could be taken. She ends by stating that she would have done anything to support their fight for freedom.
The narrator recounts another visit Ila made to visit them. Later, they go to Ila's family's vacation home outside of Calcutta, where they root around in the basement together. At the same time, he interweaves the story of his trip to London, his initial meeting with Nick Price, and the history of Lionel Tresawsen, Nick's grandfather. He feels jealous towards Nick, as Ila is clearly in love with him. The narrator then takes the story significantly back in time, describing a photograph of Tresawsen and Tridib's mother, Mayadebi, in a group with other people living in the house during the London Blitz. The narrator returns to a more recent time and says that he and Ila played house in the basement of the home they were visiting. Ila uses her doll Magda to describe a bullying incident at her school and says that Nick saved her in the end. May corrects this story and says that Ila fabricated that part of the story. The narrator realizes Nick was embarrassed to be seen with her.
The narrator flashes forward in time and writes about his grandmother on her deathbed. He says that she goes in and out of lucidity and says venomously hateful things about Ila and, eventually, him. She says that Ila left their country for money and calls her various derogatory names. The speaker describes a time when Ila, Robi, and the narrator were all back in Calcutta from their respective colleges, and Ila came to visit, wearing blue jeans and asking to go out to a club. Robi is hesitant, but Ila calls him a hypocrite, as he drinks when he is at school. They go to a club with music and a burlesque show. Robi wants to leave and Ila tries to dance with some businessmen, but Robi violently intervenes. Upset and angry, Ila screams at the narrator and Robi, saying she is only free when she is not in Calcutta. The narrator tells his grandmother this and does not speak to her again. The day before she dies, she sends a seething letter to his school saying that he should be expelled for visiting houses of prostitution. He finds her letter particularly disturbing as he did in fact go to those places, and had no idea how she knew. Before the section ends, the narrator flashes back in time and describes how Tresawsen saved Francesca, his nurse and possible lover, during a bombing raid but was himself killed by a falling beam. Ila flippantly comments that life means very little outside of London and Europe at large, which angers the narrator. They have dinner at the Prices' home and May reveals that Nick lost his job because he was accused of embezzlement. The narrator and Ila go upstairs to sleep and he inadvertently reveals his feelings for her. She expresses sympathy, but abandons him to be with Nick.
The next section begins with a description of the narrator's grandmother's retirement and her subsequent struggle to find meaning in her life. She offers an account of her childhood in Dhaka, describing her large family and the eventual infighting that overtook them, as they divided the house into separate halves. She begins to take walks by the lake and one day meets someone who informs her her uncle is still living. She receives an address, but it is unclear whether or not he is still living. She visits her cousin in an economically depressed area. The trip makes the narrator's father nervous and uncomfortable. Upon discovering that her uncle may still be living, she is determined to bring him back from Dhaka. The narrator then recounts a letter Tridib wrote to May, describing a couple he saw having sex in a home with a hole in it. She is upset by the letter but also feels overcome with emotion for him.
After this, the narrator remembers when Shaheb was promoted to a post in Dhaka. The narrator's father shares the news with his grandmother and she decides to return to her birthplace. The narrator jumps ahead in time to Ila's wedding to Nick. He becomes very inebriated and makes several sexual advances on May in her home, after the wedding. He apologizes the next morning and she accepts. He recalls a moment when she and Tridib were driving in the country and saw a dying dog on the side of the road. She demands that he stop, even though he does not want to. They kill the dog and he admits that it was the right thing to do. He then asks her, very seriously, to do the same for him should he ever need it.
In the more recent past, the narrator meets Ila at a concert at St Martin's-in-the-Field and notices that she's been crying. She informs him that Nick cheated on her, with multiple people, but she won't leave him because she loves him. The narrator depicts the preparations made by his grandmother, Tridib, and Robi to travel to Dhaka, noting that it was the last time he saw Tridib. It becomes clear that Tridib had died on the trip. In parallel, the narrator recounts a frightening day at his school, during which many children were absent and gunshots and the roar of a mob were audible in the distance. Classes are canceled and they endure a harrowing bus ride. Back in Dhaka, the narrator's grandmother is shocked by how much has changed. They see that their old home has become a bike shop. They are directed to her uncle and cousin. When they visit his home, they discover he does not remember her and does not wish to leave. He makes uncomfortable comments to May and insults the narrator's grandmother. Finally, at the suggestion of their guide, Saifuddin, the mechanic, they are able to get him into their car. They leave his home and immediately encounter a violent mob standing by a fire.
The narrator jumps forward to the near-present and says that he once had trouble convincing a colleague that these riots actually occurred. He spends an afternoon poring over newspapers in the library before he finds it, remembering that there was a cricket match that day. He connects unrest related to a stolen Muslim relic with the riots in his hometown and in Dhaka, eventually discovering a brief story about them. He then describes how his father told him about Tridib's death and wondered why he let him leave. He also describes the tepid response of the two governments involved, both of which happily swept this violence under the rug. The narrator recounts a scene in which his grandmother, who loved her jewelry, sold all of it as part of her effort to support the government. He says that he went up to her room as she listened, with great intensity, to the radio before punching a hole in it. He has a panic attack, and right before he is subdued his parents accidentally reveal that Tridib was murdered, not killed in an accident as he had previously been told.
He then remembers the first time in which Robi spoke about the incident. Ila takes them to a faux Indian restaurant in London and the owner asks them about Dhaka. Robi storms out when the owner starts praising a certain neighborhood, as it is where his brother Tridib was murdered. Outside the restaurant, he then tells the narrator and Ila that he has a recurring nightmare about the scene. They embrace. On his final night in London, the narrator has dinner with May and she finally reveals to him what happened to Tridib. They were stopped by the mob and, at his grandmother's insistence, were about to abandon her uncle to the mob. She tried to intervene, but Tridib stepped in to save her and was killed in the process. He spends the night at her apartment, and feels comfort in understanding his uncle better.