The story begins with a flashback to an afternoon at Rosewood Day School, an exclusive school in an affluent district in Pennsylvania. The sixth-graders are excited to participate in the school's annual Time Capsule competition. Each year, the administration cuts up the school's flag and posts clues as to where the pieces are hidden. If a student finds one, the child may decorate it. Then the pieces are sewn back together and the flag is buried in a time capsule for future generations to find. A student lucky enough to find a piece of the flag instantly gains popularity in the hierarchy of the school.
A crowd of students has gathered to read the bulletin announcing the official start of the competition. Alison DeLaurentis, one of the most popular girls in school, claims that her brother has been chosen to hide one of the pieces, and that he's promised to tell her where it is. Hanna Marin, Aria Montgomery, Spencer Hastings and Emily Fields — nobodies in the cliques of Rosewood Day — secretly plan to spy on Alison so they can steal the flag piece from her. Stealing pieces is allowed within the rules of the game.
Ali claims someone will have to kill her before she gives up her prize. Another student, Ian Thomas, jokes that maybe he'll do that. Ali's older brother confronts Ian about the joke, and the two seem ready to fight. Ali steps in to break up the tension. Sometime over the next couple of months, Ali drops her old friends and picks Hanna, Aria, Spencer and Emily to be in her clique. The girls don't question why they were chosen; they merely rejoice in the fact that they are now considered Rosewood royalty. Each wishes she had taken Ian's threat a little more seriously since he appears to have murdered Ali a year-and-a-half later.
Background information from previous books in this series: The four remaining friends drift apart after the murder, but they are thrust back together with the discovery of Ali's body and the mysterious texts each of them receive from someone named "A." A seems to know all of the girls' secrets, including how they'd been involved in a fireworks accident that blinded Jenna Cavanaugh, a fellow student. Over the course of several weeks, A tortures the girls, threatening to tell the most intimate details if they don't obey the commands of the texts.
A sends Aria's mother a text detailing her husband's infidelity and how Aria has kept it a secret for years. A reveals Emily's homosexuality by posting pictures of her kissing another girl. A also lets Spencer's sister, Melissa, know that Spencer plagiarized her economics essay. A tries to run Hanna over in an effort to keep her from revealing A's true identity.
In the end, it turns out that A has actually been Hanna's best friend, Mona. Mona found Ali's diary and learns all the girls' secrets. She plots her revenge against them, as she, too, had been injured in the accident that blinded Jenna. Mona dies while attempting to kill Spencer. Around the same time, the police discover evidence that Ian Thomas killed Alison.
In this book:
The four friends have been meeting with a grief counselor. She has instructed them to bring a personal item that reminds them of Ali. The girls place the gifts in a plastic bag and symbolically bury them in the yard where they'd last seen Ali.
Hanna returns home after the burial. Her mother recently moved to Singapore for a job, and Hanna's estranged father has moved back into their house. He's brought his fiancé and her beautiful daughter, Kate, with him. Hanna hasn't forgiven Kate for betraying Hanna's confidence and causing a rift between Hanna and her father. Her father, however, doesn't understand Hanna's animosity and wants the girls to become friends.
Aria is mending a broken heart over the relationship she's had with her AP English teacher. A had told others about their relationship, and the teacher was forced to quit his job and move. Aria's mother, Ella, is finally ready to re-enter the dating world since her husband left her for another woman. She is planning to going on a blind date the following evening.
She presents Aria with a ticket to an art show she is too busy to attend. Aria enjoys the paintings, and especially likes flirting with a young man while discussing the art. Aria is floored to discover he is actually the artist. She leaves a little clue in the guest registry so he might find her again, if he's interested.
Emily still grieves Alison's death, as she was her best friend, and the first girl Emily ever kissed. Emily has broken up with her girlfriend, Maya, and is struggling with all her new emotions. Her mother suggests she come to their church's fundraiser. Emily is surprised to learn that the priest has been concerned about her, not because of Emily's homosexuality, but because of the recent drama in her life. Emily agrees to go as a distraction to her problems. A local band is playing at the fundraiser, and Emily is drawn to lead singer, Isaac. He is attracted to her as well and asks for her phone number.
Spencer has had to deal with the repercussions of her plagiarism. The faculty of the school insisted she step down as student council vice president, her role in the play and running for valedictorian. Her parents have been cold to her, leaving her home from the family vacation.
Hanna is called down to the office at school, and finds her parents waiting for her. They inform her that her grandmother has died. The following morning, Hanna and her family arrive at the courthouse for the reading of her grandmother's will. While waiting, Melissa tells her that the DA is considering dropping the case against Ian for Alison's murder because there isn't enough evidence against him. She suggests the reason may be because of Spencer's plagiarism. Melissa also admits that Ian called her from the jail and begged her and the other girls not to testify against him. The sisters are called in with the rest of the family to the lawyer's office. Spencer receives a brutal shock when she learns that her Nana left $2 million to each of her natural-born grandchildren, but her name isn't read with her cousins' or her sister's. Spencer bolts from the courthouse in tears.
Aria spends the evening helping her mother get ready for her blind date. The two are finally mending their strained relationship after the events of the past month. Aria answers the door to let in her mother's date, and is shocked to see Xavier, the artist from the gallery. At first he thinks that Aria is his date until he sees her mother, Ella. Aria is mortified at the situation, but Xavier laughs it off as a coincidence. Aria can tell her mother is already attracted to Xavier and thrilled with the opportunity to date him.
Emily and the other girls meet at Spencer's house to talk about Ali as instructed to by their grief counselor. A photograph reminds Emily about the day they'd all seen the Time Capsule flyer. The girls admit it's strange that they all showed up in Ali's yard at the same time to steal her piece of the flag, only to discover that someone else had already stolen it. Melissa rushes into the room and insists they turn on the television. Ian Thomas has been released from jail on bail so that he can visit with his mother, who is dying of pancreatic cancer. He will be under house arrest until his trial. Ian insists that he has been wrongfully accused of Ali's murder. As the girls try not to freak out at the news, they each get a text message. It's from A, and it warns them that they still haven't gotten all that they deserve.
Spencer calls Officer Wilden, one of the policemen in charge of the case, to tell him about the text. The girls are sure Ian sent it to them, but Wilden isn't convinced. Spencer does notice that Wilden seems agitated about Ian's release. Even so, he doesn't believe the texts were sent by Ian but rather a copycat trying to scare the girls. After the others leave, Spencer is surprised to learn that Melissa has been eavesdropping on the conversation. Melissa doesn't believe Ian killed Ali and thinks everything Spencer told the police was a mistake.
Although she wants to hide away from the world, Spencer hears her mother in the kitchen and takes the opportunity to confront her about Nana's will. Her mother tells her only that it is legal to leave money to other grandchildren and not one in particular. Her mother walks out before Spencer can question her more. Melissa suggests Spencer think about the wording of the will that said money was bequeathed to each of her "natural-born" grandchildren. Maybe Spencer was adopted.
Kate tries again to befriend Hanna, this time over breakfast. She apologizes for betraying her, and then explains that she was going through a difficult trauma at the time. Her boyfriend had broken up with her after a night of forced intimacy. Kate admits that she'd had to see a gynecologist but won't tell Hanna why. Kate then convinces Hanna that they should team up at school so that they can rule the popular girls together. Hanna realizes that it may be her only chance to reclaim her popularity after the scandal of the previous semester and so agrees to the plan.
Aria and her brother, Mike, meet their mother and Xavier at a local restaurant. Aria is uncomfortable with the situation, as she never told her mother that she'd been flirting with Xavier at the art show. As dinner ends, Mike leaves the table to take a phone call, while Ella goes to the restroom. Aria and Xavier make forced conversation until he challenges her to a sketching contest. The two draw for one minute. Aria sketches an old man at a nearby table. She is surprised, and confused, when she sees Xavier has drawn a picture of her. Aria doesn't know if he's flirting with her or trying to bond with her because she's Ella's daughter. Then A texts images of Xavier and Aria together. One is from the art gallery, and one is from the restaurant. Both appear as if Aria and Xavier are a couple. An accompanying poem threatens to show Ella the pictures if Aria tells anyone about the new text.
Emily and Isaac meet to go sledding. She enjoys her time with him but is confused by her attraction and unwilling to tell him about her past relationship with Maya. He leaves her for a moment to chase his sled. Emily is surprised to see Officer Wilden in the parking lot, talking on his phone. He seems upset, but she can't hear what he's saying. When Wilden notices Emily, he lowers his head so she can no longer see his face. She is distracted when Aria calls to tell her about A's latest text. Aria claims she called Officer Wilden a few minutes ago, and he told her he was in a meeting. Emily thinks Aria must have misheard him.
Isaac returns with his sled. He kisses Emily. She is stunned at her reaction. She finds herself very attracted to him. A sends a text warning that if Emily tells anyone about A's sins, A will tell Isaac about her past homosexual relationship.
Kate forces Hanna to apologize to Riley and Naomi, two girls whom Hanna has been an enemy of since middle school. The girls are more than happy to be friends. Hanna wonders if they have a hidden agenda. She also obsesses over Kate's "complication" that required a gynecologist. When she sees that Kate has a cold sore, she wonders if maybe Kate got herpes from her boyfriend. Riley and Naomi eagerly talk Kate and Hanna into attending a benefit that Spencer's parents are hosting for the school. It will be a formal affair, and the four girls set out to find the perfect outfits. A texts Hanna a warning that someone in her life isn't being honest with her. A warns that if Hanna tells anyone about the text, she might have another accident, similar to when Mona tried to kill her.
Spencer finds herself attracted to her tutor, another student named, Andrew. He's been her primary competition for all the top honors at Rosewood Day, but now, he's one of her few friends. He's sympathetic to everything that's happened to her, and she finds herself admitting that she thinks she might be adopted. Andrew helps her sign onto a website that seeks to reunite adopted children to their biological parents. After Andrew leaves, Spencer receives a text from A warning her again to keep quiet about the texts. Spencer notices that the words I'm watching have been drawn in the condensation of the room's window, so she knows A has been spying on her. She approaches Hanna with the news the following morning at school, but Hanna dismisses the text as a copycat, even though Spencer is convinced it's Ian trying to scare her away from testifying.
Meanwhile, Hanna is bonding with Kate, Naomi and Riley. The more popularity she regains, the less she's attracted to Lucas, the boy who helped her recover from Mona's attack and who's been a willing shoulder to lean on throughout her father's reappearance in her life. Although Lucas is loyal and cute, he's not the right boyfriend for a popular Rosewood girl.
That evening, Ian sneaks over to Spencer's house. She tries to get him to admit to sending the texts, but he seems to have no idea what she's talking about. He tries to convince her that he didn't kill Ali. Ian tells her that he knows something about the murder that Spencer doesn't. Something even the cops don't want people to know about because they want to frame Ian for the murder. He says that he'll have the evidence tomorrow to prove his innocence. When Spencer still doubts him, he tells her that he saw another girl that night with Alison, a blonde girl.
He leaves, and Spencer receives another message from A, warning her that she's already told two people about the new texts. One more person and she'll strike out. A threatens that if Spencer turns up missing, not even her so-called parents will miss her.
Emily is excited, but confused, as she gets ready to meet Isaac at a Chinese restaurant. It is located next to a bowling alley. As Emily pulls into the parking lot, she remembers when Alison had invited all the girls to hang out there when they'd first become friends. Emily recalls asking Ali about the fight Ian and Ali's brother had outside the school. Ali brushed off the incident, claiming that she teased her brother about it in the car on the way home that day. But Emily remembers that Ali's brother left without her.
Emily shakes off the memory as she enters the restaurant. Although she is attracted to Isaac, she's worried he might find out about her past relationship with Maya. Isaac tells her that his father owns a catering business and that he'll be working a fundraiser on the weekend, sponsored by Emily's school. He wonders whether she'll attend. Emily figures she has to go, if only to stop anyone from telling Isaac about her homosexuality. She's surprised when Maya shows up at the restaurant.
Isaac introduces himself as Emily's date, and Emily flees to the parking lot before Maya can divulge her secret. A texts her with a message warning Emily that if she talks to anyone, people learning about her past will be her smallest problem. Isaac follows her outside and apologizes for calling himself her date. Emily insists that wasn't the reason for her actions. She asks him to try and get the night off from work so he can be her date to the fundraiser. He agrees. She tells him that Maya is just a friend from school.
Aria has been stressing about Xavier, as he has become a regular around her house. He arrives one night while Aria is watching the news and her mother is still at work. The two watch a news story about the upcoming trial of Ian Thomas. Xavier expresses his surprise that someone like Ian could have committed the murder. Aria becomes upset, but Xavier soon has her laughing again. The two begin a pillow fight that ends when Xavier kisses Aria. She's floored at his actions and runs up to her room, almost immediately receiving a text from A, indicating that A knows what happened.
The following morning, Spencer has a strange dream in which Ali appears as both a sixth-grader and the way she looked before she died. Both Alis warn Spencer that she shouldn't have thrown something away, but they're not specific about what that is. Spencer wakes up to her alarm and gets ready for school. She meets up with her old friends, and they discuss the start of the trial that afternoon.
Hanna leaves the group to hang out with Kate and her new friends. When Lucas shows up, Hanna acts disinterested in him and tells him she doesn't want him to drive her to the courthouse later. Kate and the others walk ahead, and Hanna is convinced they are talking about her. She receives a text from A that illustrates how much A knows about Hanna's past and her insecurities. It also warns Hanna to ruin Kate before Kate has a chance to ruin her.
The old friends sit together in the courtroom that afternoon, but the trial never begins because Ian is missing. They overhear his father tell the police that he saw him the previous night in his bedroom, but hasn't been able to locate him all day. Spencer admits her conversation with Ian the night before to the other girls.
Hanna goes for a run to clear her mind, but her thoughts keep spinning. She begins to think that Mona and Kate must have corresponded so that's how Mona learned more details about Hanna's life. She convinces herself that Kate and Mona had a plan to bring her down and that Kate is still working on seeing the plan completed. When she gets home from her run, Hanna overhears Kate talking on the phone in her bedroom. Kate seems to be telling someone that the time is almost right and that something will work out. Hanna sees this as confirmation that Kate is plotting against her.
Emily and Isaac attend the Rosewood fundraiser at Spencer's house. Spencer tells them that Officer Wilden is insisting they all stay inside while Ian is missing. Some of the boys from Emily's school start to question her about Isaac, and she panics. Isaac follows her into the bathroom, and she explains everything to him about the past few months and how she'd been experimenting with homosexuality. She promises Isaac that although she might not have been entirely truthful to him, she'd meant everything she'd said about wanting to be his girlfriend. Isaac accepts her for who she is and the two hug.
Meanwhile, Spencer has a fight with her parents and finds her own place to hide in the house. Andrew comforts her. She admits everything that's happened to her over the past month, surprised that Andrew is so understanding. The two kiss. She receives a text from the adoption website claiming that someone matching her birth records has been found and should be in contact with her soon. As she and Andrew cuddle, Spencer's eyes are drawn to an old picture of Ali on the mantle. Spencer is reminded of her dream and realizes that in the dream Ali was telling her she'd buried a valuable piece of evidence in the bag with the other girls' souvenirs. She asks Andrew to tell Officer Wilden to search for her if she's not back in 10 minutes. Then she heads outside.
Hanna and Lucas arrive at the party. Hanna tries to persuade him that Kate is out to ruin her, but Lucas isn't convinced. She gets angry, saying that he doesn't understand because he's never been in the popular crowd. When Hanna sees all the attention the boys are paying her future stepsister, she decides she has to act before Kate sets her plan in motion. Hanna announces that Kate has herpes. Everyone immediately steps away from her, even though Kate insists it isn't true. Although she should feel good about her success, Hanna feels awful. Lucas is furious and breaks up with her, leaving Hanna alone in the room.
Aria is surprised to meet Xavier at the party, especially since her mother had to work and couldn't come to the event. Aria can't control her nerves around him and tries to hide in Spencer's bedroom, but Xavier follows her. He accuses her of sending him mixed signals about her feelings for him. He's sure that Aria wants to have an affair with him, which is why she didn't tell her mother about their kiss. Aria assures him that isn't the case at all. She just didn't want to hurt her mother's feelings. When she tries to assert that Xavier should leave her and her mother alone, he tells her that he's not going anywhere. If Aria tries to break him and Ella up, he will claim that Aria came on to him. Aria knows, as much as she hates the idea, she has to go live with her father and his pregnant girlfriend so she can keep far away from Xavier.
Spencer uncovers the bag containing the mementos she and her friends had buried. She studies the picture that Aria had drawn. It was of the day in sixth grade when Ali held the notice about the Time Capsule competition. Aria had captured the people surrounding Ali as well, one of who was Ian Thomas. In the sketch, Ali is looking smug, but Ian is looking vulnerable. Spencer remembers Ian's claims that he and Ali flirted but weren't serious about a relationship until she suddenly had a change of heart. Spencer wonders whether Ian could be telling the truth about someone else killing Ali. She gets a message from Ian to meet him in the woods where Ali died. He has something to show her.
Hanna's father arrives at the event with Kate following behind him. When Hanna explains that she'd heard Kate making threats to ruin her over the phone, Kate replies that she'd been practicing her lines for "Hamlet." Hanna's father grounds Hanna from seeing or talking to any of her friends. From now on, she has to go everywhere with Kate. If she disobeys, he'll take away her phone, her handbags and then her clothes. Before he leaves the function, he tells her to warn all her friends that she won't be able to see them and to be home within an hour. Hanna realizes that the things she overheard Kate say are never spoken in "Hamlet." She knows Kate lied, but she also knows her father will never believe it.
Hanna, Aria and Emily meet up at the party. Emily has just seen Officer Wilden, who told her Spencer is missing. No one has seen her for about 30 minutes. The girls confess the notes they've received from A, but Emily tells them that Officer Wilden is convinced the notes didn't come from Ian. The girls wonder who could have sent them. Just then, they all receive another text from A. This one claims to know that they've all told someone about the notes they were supposed to keep secret, and now someone has to pay the price. It tells them that their former friend is outside. As they search the house for Officer Wilden, A texts again. This time the message says to go outside alone. The girls sneak out the back door. They can hear someone whimpering and follow the noise into the woods. Hanna trips over a branch and falls to the ground, disorientated. She tells the other girls to run on ahead, but then realizes she's alone in the woods with Ian, or A, or whoever is sending the notes. A figure comes into the clearing, but it's wearing a hood. Hanna knows the person is too small to be Ian, but she can't distinguish if it's male or female. The figure runs off.
As Aria combs through the woods with Emily, she remembers the last time she was in them. It was after they'd all gone to Ali's house to steal her piece of the flag, but Ali said someone had already taken it. The girls each went their separate ways. Aria had run into Ali's brother, Jason, in the woods. He gave her Ali's piece of the flag. Aria never turned it in, as she didn't know what Jason had wanted her to do with it. She remembers it's still in a box in the back of her closet. Hanna catches up with them, and the three find Spencer kneeling on the ground, looking terrified. Then they see the body of Ian Thomas in front of her. It seems to have been there a long time as it is stiff and blue. The girls receive a text from A, telling them that Ian had to die.
An afterward from A gloats to the reader about all the trouble A is causing. A enjoys getting revenge on the four girls and thinks they deserve all the pain he/she is doling out.