Jay Baruchel arrives in Los Angeles to visit with old friend and fellow actor Seth Rogen, who invites Baruchel to attend a housewarming party hosted by James Franco. At the raucous party, many celebrities and others drink, take drugs, have sex, and commit other immoral acts. Baruchel is uncomfortable being around many people he does not know well including Jonah Hill, Christopher Mintz-Plasse, Michael Cera, Craig Robinson, and Emma Watson and Rogen accompanies him to a convenience store for cigarettes.
Beams of blue light from the sky suddenly carry away several store customers. The frightened Rogen and Baruchel flee to Franco's home amid explosions, vehicular crashes, and mass chaos, but find the party undisturbed by the blue beams. The partygoers scoff at Baruchel's account, but rush outside because of a powerful earthquake and see the Hollywood Hills on fire. A large crack opens in the earth, and Cera, Mintz-Plasse, Rihanna, Mindy Kaling, Aziz Ansari, Kevin Hart, Jason Segel, and David Krumholtz are among those killed. Rogen, Baruchel, Franco, Hill, and Robinson survive, and learn that the largest earthquake in California history has struck Los Angeles. Believing that as famous actors they will soon be rescued, the five take inventory of the available supplies, including food and water, various drugs, and a pistol. They set up a ration system, board up the doors and windows, and await help.
The next morning, Danny McBride who, unknown to the others, crashed the party and fell asleep wakes up first. Ignorant of the crisis he wastes much of the supplies, and disbelieves the others' accounts until a desperate outsider seeking aid is decapitated in their presence. The men pass the time by taking many drugs and filming a homemade sequel to the 2008 film Pineapple Express, which most of the group had appeared in. Tensions rise, however, due to various conflicts, including Baruchel and Rogen's growing estrangement, and the others' skepticism of Baruchel's belief that the disasters might be the Apocalypse the Book of Revelation predicts.
An armed Watson returns and reports mysterious animal noises. Due to a misunderstanding she quickly leaves, taking all of the drinks. Robinson is chosen to travel outside to the cellar for water, but is frightened by something monstrous. The group successfully reaches the water but McBride's boorish behavior results in much being lost, and the others decide to evict him. McBride tries to kill the others with the pistol but fails as the gun is a prop, and angrily leaves the home.
Robinson's experience causes him to believe in Baruchel's theory of the Apocalypse and that the blue beams have, as part of the Rapture, taken good people to Heaven. He volunteers to explore a neighboring home for supplies with Baruchel. Hill secretly wishes for Baruchel to die, and is subsequently raped by an incubus. Now demonically possessed and supernaturally strong, Hill chases Franco and Rogen, while Robinson and Baruchel flee a demonic bull. The group subdues Hill, but during an exorcism attempt, a fire destroys the home and Hill's body, forcing the four outdoors.
Regretful for the mistakes in his life that kept him from Heaven, Robinson volunteers to sacrifice himself so his friends can escape a large winged demon. The plan succeeds but, unexpectedly, Robinson is taken in the Rapture because of his good deed, giving hope to the group. When cannibals led by McBride capture the men, Franco similarly volunteers to sacrifice himself. Although the plan succeeds and a blue beam begins to take Franco, his taunting sneers to McBride cause the beam to vanish, and the cannibals eat Franco. As Satan is about to consume Rogen and Baruchel, they reaffirm their friendship and await death. A blue beam suddenly strikes Baruchel, who tries to pull Rogen up with him, but together they are failing to reach Heaven. Rogen lets go to allow his friend to ascend, and just before being killed is also taken by the Rapture.
Robinson, now an angel, welcomes Baruchel and Rogen in Heaven. He explains that it is a paradise where any wish comes true. Baruchel wishes that the Backstreet Boys would reunite, and the film ends with the band performing "Everybody (Backstreet's Back)" for a raucous heavenly party.