The play opens on the same scene as the epilogue from Harry Potter and the Deathly Hallows: Harry and Ginny’s younger son, Albus, is getting ready to board the train for his first year at Hogwarts. Harry is the head of Magical Law Enforcement at the Ministry, Hermione is the Minister of Magic, Ron manages Weasley’s Wizard Wheezes, and Ginny edits the sports section of the Daily Prophet. Albus is nervous about being placed in Slytherin House, but Harry assures Albus that the Sorting Hat will take his choice into account, and that there’s nothing wrong if he is placed in Slytherin.
Aboard the Hogwarts Express, Albus quickly befriends the kind and awkward Scorpius Malfoy, Draco Malfoy’s son. At school, Albus is immediately sorted into Slytherin with Scorpius, which devastates him. Albus also quickly discovers he has little magical talent, which makes him vulnerable to bullying. In addition, students make fun of Scorpius because he is rumored to be Voldemort’s son. Years pass, and each one seems to grow more miserable for Albus. He grows more distant from Harry because he hates being compared to his famous, talented father, but he grows closer to Scorpius.
Just before the start of Albus’s fourth year, the Ministry of Magic acquires a Time-Turner. As rumors spread about the Time-Turner, Harry receives a visit from Amos Diggory, begging Harry to use it to go back in time and save his son Cedric’s life. (Cedric was murdered by Voldemort after winning the Triwizard Tournament, although Voldemort was really after Harry.) Harry feels guilty about Cedric’s death, but he knows that meddling with time is dangerous. Albus overhears this argument and he also meets Amos’s niece, Delphi.
The night before Albus returns for his fourth year, Harry tries to connect with his son by giving him a blanket—the only thing he has left from his mother, Lily. Albus doesn’t appreciate the gift and is frustrated with his father, leading Harry to say that sometimes he wishes Albus weren’t his son. Albus picks up the blanket and throws it; it collides with a love potion Ron gave him and the blanket is ruined.
The next day, Albus decides that he wants to correct Harry’s mistake in inadvertently causing Cedric’s death. He and Scorpius jump off the Hogwarts Express, meet up with Delphi, and break into Hermione’s office at the Ministry of Magic to steal the Time-Turner. They then go back in time (this Time-Turner only allows for them to travel for five minutes) to the Triwizard Tournament’s first task in 1994, posing as Durmstrang students and disarming Cedric so that he’ll do poorly in the task and won’t be able to win the tournament, which will then prevent his death.
Meanwhile, Harry has recurring nightmares about Voldemort, making him suspicious of the dark wizard returning. After learning that Albus and Scorpius are missing, he also has a dream about Albus in the Forbidden Forest, and he, Hermione, Professor McGonagall, and Draco search for the boys there. In the forest, the centaur Bane warns Harry that Albus has a “dark cloud” around him, and Harry could lose him forever. They find Albus and Scorpius just as the boys are returning from their time travel.
Albus soon learns that his and Scorpius’s actions have created ripple effects in time: Cedric still died, because he was even more determined to win the tournament after losing the first task. But they also prevented Hermione and Ron from falling in love and marrying, and thus prevented Albus’s cousin Rose from being born. Harry also tells Albus that he doesn’t want Albus to be friends with Scorpius anymore, believing that Scorpius is the “dark cloud” Bane spoke of. Albus is furious and threatens to run away again, but Harry says that Professor McGonagall will use the Marauder’s Map to keep an eye on Albus and Scorpius.
Over the next few days, Albus and Scorpius are both devastated at not being able to see one another, and Draco visits Harry and convinces Harry to change his mind about separating the boys. The same day, Scorpius decides to approach Albus despite not being allowed to see each other, saying that they have to fix what they changed in the past. They reconcile and decide to go back in time and humiliate Cedric in the second task so there’s no way he’ll win the tournament. However, when Scorpius returns to the present after doing so, he discovers that Albus has disappeared. It turns out that they created an alternate universe in which Harry is dead, Albus was never born, and Voldemort rules the wizarding world.
In Part 2, Scorpius walks tentatively through a new, fascistic world, with Voldemort ruling and a powerful dark figure called the Augurey heading the Ministry of Magic. As Scorpius asks questions about what happened with Harry Potter and Cedric Diggory, people become suspicious, including Draco, who says that Scorpius’s questions are embarrassing the Malfoys. Scorpius tries to tell his father that he doesn’t like what their family has become, and Draco recognizes how brave and good Scorpius is—just like his mother, Astoria.
Scorpius soon learns that, while Cedric Diggory lived, he became a Death Eater and killed Neville Longbottom, which then caused ripple effects that enabled Voldemort to survive the Battle of Hogwarts. Scorpius teams up with Professor Severus Snape, along with Ron and Hermione (who are in hiding). The four of them go back in time with Scorpius to the first task, stopping Albus and Scorpius from messing with the events. But when the group returns to the present, dementors swarm on them. Hermione and Ron sacrifice themselves to hold off the dementors, but Scorpius is filled with despair and can’t bring himself to get away. Snape instructs Scorpius to think of Albus in order to find the strength to go on, and then Snape sacrifices himself to the dementors as well—even knowing that he won’t be alive in the corrected timeline.
Scorpius runs down to the lake and goes back in time to reverse his mistakes at the Triwizard Tournament. When he emerges in the present, Albus surfaces beside him and Scorpius is overwhelmed with joy—until Professor McGonagall, Draco, Ginny, and Harry find them and say that they have a lot of explaining to do. Scorpius also realizes that he lost the Time-Turner in the lake. After hearing Albus and Scorpius’s full story, McGonagall scolds them severely for their stupidity. Later, Harry apologizes to Albus for treating him so harshly.
That night, Scorpius wakes Albus, explaining that they have to destroy the Time-Turner. Albus agrees, and he sends an owl to Delphi to explain that they’re destroying it. Delphi arrives to help, and Albus notices a tattoo on the back of Delphi’s neck for the first time—it’s a tattoo of an Augurey, the symbol of the head of the Ministry of Magic in the alternate timeline where Voldemort ruled. Taking the Time-Turner from Scorpius, Delphi explains that she was raised by Death Eaters and that she is Voldemort’s daughter. She then takes the boys captive, explaining that she plans to travel back to the third task to make sure that Cedric becomes a Death Eater and Voldemort returns to power. She also kills a student, Craig, who is looking for Albus and Scorpius.
When Albus and Scorpius are discovered missing once more, Ron reveals that he saw Albus and Scorpius with Delphi. Harry then confronts Amos Diggory, but they learn that Delphi isn’t his niece like she claimed. Searching Delphi’s room, they discover that she is Voldemort’s daughter and she’s trying to fulfill a prophecy to bring Voldemort back. They figure out that Delphi used a Time-Turner once again, though they have no idea when or where she is taking the boys.
At the third Triwizard Tournament task, Delphi tries to make Albus humiliate Cedric by torturing Scorpius, but Cedric is able to disarm Delphi. Then Albus lets Cedric complete the maze, knowing that this will lead to Cedric’s death. Furious that her plan is foiled, Delphi formulates a new plan and takes Scorpius and Albus further back in time before destroying the Time-Turner and abandoning them, leaving them stranded in this new time.
Albus and Scorpius figure out the date: October 30th, 1981—the day before Voldemort attacked baby Harry and killed his parents. Scorpius and Albus hurry to Godric’s Hollow, where Harry lived as a baby, and try to figure out a plan. Seeing Harry’s parents push baby Harry in a stroller, Albus remembers that, in the future, the blanket Harry is wrapped in is going to be soaked by a love potion. They find something that will react with the love potion and use it to write a message to future Harry, explaining when and where they are.
In the present, Draco reveals that he has another Time-Turner—one that doesn’t have a five-minute time limit. Soon after, Harry discovers Albus’s message on the blanket and he, Ginny, Hermione, Ron, and Draco use the second Time-Turner to go back to Godric’s Hollow in 1981, where they find Scorpius and Albus, to their relief. Scorpius and Albus explain that Delphi is trying to stop Voldemort from killing baby Harry (thereby stopping Voldemort from losing power), and the team decides to transfigure Harry into the shape of Voldemort to lure Delphi into the nearby church. However, she realizes that Harry isn’t Voldemort and almost kills Albus—but with the whole team’s help, they are able to subdue Delphi and plan to take her to prison in the present.
Soon after, Voldemort arrives, and Harry watches as Voldemort kills his parents, knowing that to interfere would be too risky. Albus and Ginny support him, holding his hand as they all watch together.
In the present, Scorpius and Albus affirm their friendship once more and decide to try and become more engaged with other students and activities at Hogwarts. Harry also walks with Albus, explaining that being a father is terrifying because he never had a father himself. He says that he’ll try to be a better father, and Albus replies that he’ll try to be a better son. At the end of their walk, Harry brings Albus to Cedric’s grave, explaining that he tries to say sorry for his role in Cedric’s death whenever he can.