Following Xander and Willow's kiss in "Lovers Walk", Oz has called a time-out on his relationship with Willow and Cordelia is decidedly avoiding any contact with Xander. Cordelia returns to school only to be rejected and taunted by Harmony and her former clique as being "Xander's castoff". Cordelia goes to the Bronze that night and Buffy accidentally humiliates Cordelia further by knocking her into a pile of trash in front of her friends while fighting a vampire. Cordelia later determines Buffy is to blame for her predicament as she never would have dated Xander if Buffy hadn't hung out with him and made him marginally cooler. The next day, Anya - a new girl who has been trying to befriend Cordelia - gives Cordelia an amulet while goading Cordelia into wishing that Buffy Summers had never come to Sunnydale. Anya immediately switches to demon form, that of Anyanka, and grants it.
Cordelia finds herself in a town overrun by the Master, where most of the student body are either dead or vampires and there is a nighttime curfew. Students wear dull colors in order to make them less conspicuous to the vampires who have taken over Sunnydale, all but the newly transported Cordelia, that is. Cordy finds that she is back in with her former group, but quickly loses her cool when she finds out that Willow and Xander are dead. Walking through the streets at night she is stopped by Xander and Willow, who she realizes are vampires. Cordy is saved by the "White Hats," a group of human vampire-fighters led by Giles and including Oz and Larry.
Cordelia tries to explain to Giles what happened and asks to have Buffy back so that things could be the way they were, but, before she can elaborate, she is killed by Xander and Willow, whom the Master had sent as assassins, fearing that Cordelia would summon the Slayer to Sunnydale. Giles calls Buffy in Cleveland and, through research, discovers that the amulet is that of Anyanka, the patron saint of scorned women.
At the same time, the Master has created a human blood processing plant, where he plans to industrialize blood removal from humans through assembly lines, thereby eliminating the predatory aspect of the vampire's nature while rendering feeding more efficient.
On his way home, Giles encounters vampires who are herding humans for the plant, and, an extremely "different", war-worn Buffy rescues him when he is nearly captured himself. This Buffy is very much like Faith in that she is only interested in the kill and is emotionally shut down. She is cynical about Giles's prospects of reversing Anya's spell, but does offer to kill the Master while she is in town.
Pleased that Cordelia is dead, the Master allows his underlings to torture Angel, who is being held captive. Buffy finds Angel in his jail cell and agrees to take the vampire along, after Angel relates his desire to stop the Master after the torture that was inflicted on him.
The Master starts up the plant with the first human victim before a cage of prisoners. Giles summons Anyanka, who confirms Cordelia's story. Buffy and Angel attack the vampires, but most of the characters die in the fight: Angel is killed by Xander, Xander is killed by Buffy, Willow is killed by Oz and finally, Buffy's neck is broken by the Master. As Buffy's lifeless body falls to the ground, Giles realizes that Anyanka's amulet contains her powers and tears it from her neck. To distract Giles, she asks how he can be sure the real world is a better one. Giles replies "Because it has to be". He breaks the power center and reverses the spell. The scene immediately flashes back to the regular Sunnydale, at the moment just before Anyanka granted Cordelia's wish. However, Anyanka is dismayed to find herself a powerless Sunnydale High student unable to grant any of Cordelia's wishes.