Homestuck begins when thirteen-year-old John Egbert (named via suggestion on the website's forums) receives a beta copy of an upcoming computer game, called "Sburb", in the mail. Installing and running the game on his computer triggers a meteor attack on his real-life house, which he survives only by being transported to another planet, thus immersing him completely within the world of Sburb. As John's friends Rose Lalonde, Dave Strider, and Jade Harley join the game with him, they learn that they have unwittingly triggered the end of the world, and that it is their duty to play the game and thereby see the story through to its completion.
As they begin to explore the world of Sburb, John and his friends are harassed by a group of twelve internet trolls who have played the game before. Further contact with the trolls reveals that they are not human at all, but an alien species actually called "trolls". As the trolls gradually become more important to the story, the narrative shifts to a side story exploring the nature of troll society and the specific sequence of events that led to these particular trolls entering the game themselves. The trolls' arc concludes with the revelation that winning the game causes the creation of a new universe, and that it was the trolls who originally created the humans' universe.
The story returns to focus on the humans. Increased contact between the humans and the trolls leads to an uneasy friendship between the two groups, as well as the discovery that they must cooperate to try to salvage the kids' doomed game session. They learn that the game has a mechanism for restarting, called a "scratch", and they begin working toward the ability to activate it. Fighting against them is a rogue non-player character within Sburb, called Jack Noir, who becomes nearly invincible in their session and is unique because of it, as the trolls had formed an alliance with their version of Jack Noir. Despite this obstacle, the kids narrowly manage to trigger the scratch, which results in the destruction of the kids' universe—though the players themselves survive by traveling through pocket dimensions that will lead them to the new session.
The scratch causes the humans' universe to restart, with the condition that adolescent versions of the kids' ancestors are playing through Sburb, rather than kids themselves. John's grandmother, Jane Crocker, who had died before the story began, is a fifteen-year-old girl and the protagonist of the new arc. She leads her three friends, Roxy Lalonde, Dirk Strider, and Jake English, through their own session. Meanwhile, the original humans and surviving trolls must journey to the new universe over the course of three years, in order to aid the new session and bring it to completion. Threatening their plan is a villainous creature called Lord English, a purportedly invincible time-controlling demon, as well as the still-dangerous Jack Noir.
The kids and the trolls eventually meet up in the new universe, although they are scattered throughout it by the Condesce (The troll empress), who is a servant of Lord English. She proceeds to imprison or enslave several of the kids, including Jane Crocker, Jade Harley, Jake English, and Roxy Lalonde. The trolls and remaining kids set out to find each other, each with their own plans. They are all fighting on Jade's planet when the Condesce arrives.