Andi Alpers is a senior at one of Brooklyn's most exclusive private schools. She and some of her classmates get together at one of their houses before school in order to drink and get high, mostly to be cool or alleviate boredom. Andi does it to drown the guilt she feels over the death of her brother, Truman.
Even though it's winter, Andi skips school one day and plays her guitar on the streets. Her music is the only thing that relieves her depression. She plays so long and so intently that her fingers begin to bleed. When she tries to sneak into school later to attend her music lesson, the headmistress stops her. Andi hasn't applied to any colleges, is failing several classes and hasn't turned in an outline for her senior thesis. Failure to turn in an outline will result in Andi's immediate expulsion. When the headmistress sees Andi's bleeding fingers, she tells her to stop punishing herself for something that happened in the past. Andi leaves the administrator's office to find solace with her music teacher, Nathan. A 70-year-old Auschwitz survivor, Nathan is the only one who doesn't try and make Andi forget her pain; instead, he tries to help her channel it into her music.
Back home, Andi's mother has retreated into an almost silent world of paint. She spends her days painting portraits of her son, hoping to one day capture the right color of his eyes. The portraits cover the walls and even the ceiling of her mother's studio. Andi does her best to make sure her mother eats. When she undresses for bed, Andi fingers the key that hangs around her neck. She never takes it off. Truman had found it at a flea market and given it to their father. Their dad had been searching for years for a certain genome in human DNA that he called the key to the universe. Truman thought the antique key with the letter "L" on it was the answer because "L" starts the word love, and he knew love was the key to the universe. For a while, Truman's gift convinced their dad to spend more time at home, but after he won the Nobel Prize for his scientific work, things became worse with their father leaving for extended periods of time. Eventually, Truman went into his study and took back the key. Andi found it in the pocket of his pants after he died. She's worn it around her neck ever since.
Andi's old boyfriend Nick invites her to a party at his house. He convinces her to attend by promising she can play Keith Richards' (of the Rolling Stones) guitar. She takes the guitar to the roof of the townhome and plays the instrument until her fingers are frozen in the frigid air. Her depression closes in around her, and Andi is drawn to the side of the roof where she stands on the edge and contemplates jumping off. Nick arrives in time to stop her by reminding her that she still has the guitar strapped to her back. It would be a crime to destroy it. In her haste to give the instrument to him, she nearly slips off the icy roof. Nick catches her. The two wind up in a romantic embrace. When Nick's girlfriend catches them, she is livid. Andi leaves the party and heads home.
She arrives to find her estranged father in their house. He has received numerous letters and phone calls from Andi's school about her grades. Neither Andi nor her mother would answer the phone when he tried to call. He is appalled by his ex-wife's mental state and the condition of the apartment. He insists that Andi spend winter break with him in Paris so he can supervise her work on her outline. He also commits her mother to a psychiatric hospital.
Andi is petulant about the trip — irate that her father has suddenly come in to try and fix her life. They arrive at the home of G, a friend of her father's from college and the foremost authority in the French Revolution. He and his wife bought an old furniture factory and are turning it into a museum about the revolution. Andi's father is there to do DNA research on G's most prized artifact, a preserved heart, believed to be that of Charles-Louis, the son of beheaded King Louis XVI.
When Andi hears the story of how Charles-Louis, just 8-years-old when the revolution began, was kept alone and imprisoned for several years, it stirs memories of her brother. She leaves the adults and begins searching through the artifacts in G's house. She comes across an old guitar from the revolution. G encourages her to restring and play it. Her father reminds her she is in Paris to work on her thesis. She intends to write it on French guitarist Amade´ Malherbeau and his influence on every major composer since the French Revolution, from Beethoven to Radiohead. Andi gets her father to agree to let her go home early if she can show him a solid outline and introduction for her thesis.
Andi discovers that her brother's key opens a secret compartment in the guitar case. Inside are a small potpourri bag, a diary and a tiny portrait of a young boy who reminds her of her brother. The diary belonged to a 17-year-old girl named Alexandrine or Alex during the French Revolution. The diary tells of a young boy kept prisoner in a room. Andi stops reading, refusing to be sucked into the tragic story, but the story seems to call to her. She picks up the book again, and a newspaper clipping slips out of the pages. It tells about someone nicknamed "The Green Man," who was illegally setting off fireworks. Some people believed he was using them as a signal to insurrectionists or foreign armies. The police were diligently searching for the criminal. Alex's family worked as puppeteers before the revolution. As conditions for the poor around Paris began to worsen, with starvation and disease constantly threatening their lives, the family moved to Versailles where things were supposedly easier.
Andi stops reading in order to go to the market to get something to eat, but her father's bankcard no longer works. She goes back and gets her guitar and tries playing outside the Eiffel Tower to earn some money. There she meets Jules, a local musician, who asks if she'd like to jam with him at a café. Andi agrees, and the two of them play for a bowl of stew. Jules' friend Virgil joins them for dinner, and Andi is immediately smitten with the handsome cab driver and hip-hop artist. The three jam together at the café and collect a handsome bit of money for their efforts. Virgil offers to give Andi a ride home in his cab, and they enjoy listening to the music on her iPod.
Back at G's apartment, Andi reads more of the diary. At first, times were just as bad in Versailles for Alex's family. But one day the royal carriage stopped so the young prince could watch the show. Alex charmed the prince so much with her antics after the show that she and her family are invited to perform at the palace the following day. Again, Alex entertained the prince, who has been melancholy since the death of his older brother. The queen, Marie Antoinette, then asked Alex to become the prince's companion, to play with him and keep him cheerful. Alex believed this would be her and her family's ticket to a comfortable life.
Virgil calls Andi's cell phone the next morning. She'd forgotten her iPod in his cab, and he found her number on the back. Virgil is tired after driving his cab all night, but he needs someone to talk to in order to wind down. He and Andi talk for a while about music, and Virgil admits that he listened to the songs on Andi's iPod. He asks her to sing one of her songs. As she does so, Virgil falls asleep to her singing. Virgil intrigues Andi, and listening to the gentle sounds of his breathing draws her even closer to him.
Alex's diary takes a strange turn as she tells about buying fireworks from the black market. She was sad about Charles-Louis being kept prisoner and how she longed for him to be free again. She and Charles would watch the fireworks at night in Versailles. The boy loved them better than chocolate or any of his toys. He said they look like the stars breaking apart or like his mother's diamonds. Alex then described the days and events leading up to the revolution, of how King Louis XVI ignored the signs of the uprising until it was too late and how the queen would not leave him and so doomed herself and her family. The peasants and police stormed the palace at Versailles and took the royals back to Paris to be held prisoner in a smaller castle there.
Another day, she reads the next journal entry. Alex was almost captured by the police when she lit off fireworks. She was lighting them to bring comfort to Charles-Louis as he sat alone in a prison without any friends or family. The police knew now that Alex is a woman. She hid among the catacombs of Paris to evade capture. Andi is overcome with emotion when she reads Alex's words. She calls Virgil and asks if he would return the favor and sing her to sleep, which he does.
Andi does some research on Amade´ Malherbeau at the library. They have a copy of his death certificate, but not of his birth certificate. The clerk tells her the document may have been destroyed in the revolution or perhaps he was born under a different name. She looks through other artifacts before she is thrown out of the library because her cell phone goes off, disturbing the other patrons. Andi is convinced she turned the ringer off after talking with Virgil earlier in the morning, but when she found it in her bag, under Alex's diary, it was on. Even stranger, the person calling didn't leave a message or a call back number. Andi has the bizarre feeling that Alex somehow orchestrated the call so that Andi would keep reading her diary.
Alex and her family followed the king back to Paris but were kept away from the palace. They sank again into poverty. Alex made some extra coins by dressing as a boy and reciting dramatic pieces to patrons at the Palais, an area of bars and brothels in the city. One night, she stole the purse of a wealthy man and was chased by the police. When they captured her, another man stopped them from accosting her. He was the Duc d' Orlèans, the king's cousin. He then took Alex to his mansion and offered her a job spying on the king's family. He told her it was for their benefit, that he needed to know who was still friendly with the king so that he, the Duke, could know who to trust when he sought to get them released. Alex was tasked with dressing like a boy and acting as a servant to the prince. She agreed to his plan. Charles-Louis was ecstatic to see her again, and she spent almost every waking hour with him for two years.
Andi continues to have contact with Virgil over the phone. Andi calls him one night to ask him to sing her to sleep, but he can't because he has too many customers in his cab. He tells her to lay out her clothes and put her phone on her pillow, and he will call her in the morning. She does as he asks, and he wakes her up at 4:30 the next morning. She dresses in the dark and meets him outside G's house. He takes her into Paris, to a hilltop, where he spreads out a blanket, and they watch the sunrise over the city. The two share a passionate kiss, and Virgil asks Andi to stay in France. Andi insists she can't. Virgil presses her to tell him what has made her so angry and sad. Andi doesn't have the courage to open the wounds that haunt her, so she begs him to take her home.
Andi tries to forget Virgil by reading more of the diary. Alex's entries are chaotic and include visions of dead people. She kept the royal family's plan to escape Paris a secret from the Duc d' Orlèans. The duke beat her when he discovered the family had gone. One of his servants explained to Alex that the duke was next in line to the throne after Louis and Charles-Louis. He was determined to bring them down so that he might become king. Alex was unsure what to believe but knew she could trust no one.
Andi takes a break from reading the diary to continue her research of Amade´ Malherbeau. She finds his home and is drawn to his portrait. He was a handsome man. He holds a red rose, the thorn of which has cut his finger. Behind him are two miniature portraits of a man and a woman, also holding a rose. A plaque describing the painting says the portraits are probably those of Malherbeau and his lover.
Alex's diary continues to intrigue Andi. She reads how Alex was dedicated to the innocent young prince. She has learned of his mistreatment, how he was kept alone, never allowed visitors, barely fed and without a bathroom. Alex knew her fireworks were the only comfort he had and remained determined to continue lighting them. She described the brutality of the revolution as the mobs began to behead the nobility. She was angered when she discovered that the Duke had been orchestrating the mobs all along. Andi remembers studying the revolution in school and how her teacher couldn't tell the students who had caused it. So many theories exist, and all have a germ of truth in them. Andi has grown to love Alex and the little prince, and she hopes that the heart G and her father are testing is not Charles-Louis', but that he managed somehow to escape his prison.
Andi finishes the outline and the introduction to her thesis and gets her father's approval to leave Paris that night. But before she can leave, her flight is canceled because of a workers' strike. Although upset, Andi takes the opportunity to go back to Remy's so she can jam again with Virgil and Jules. When she gets there, they are already playing. She sees a beautiful girl go up between songs to hand Virgil a towel and some water. When she tries to leave, Virgil grabs the girl's wrist and pulls her toward him so he can kiss her on the cheek. Andi's heart is broken. She runs from the café.
The following day she finishes Alex's diary. Alex described how the queen was forced to listen to her son being beaten in the room below hers. When Alex came to say goodbye, the queen gave her the guitar that Andi found. Alex discovered the prince's portrait and a sack of gold coins in the case's secret compartment. At first, she used the money to try and bribe the guards to help the prince escape, but they refused her money and sent her away. Using the coins, she bought her first rockets to cheer the prince. When the Duc d' Orlèans was captured by the mob, he gave Alex his rings and begged her to save herself by leaving France. She refused, vowing to save the prince. The Duke gave her a parting look of sadness, saying there was nothing more she could do for Charles-Louis.
When Alex turns the page, she sees it is Alex's last entry and it is covered with blood. She doesn't want to read it, so she goes down to talk to her father. He tells her the DNA tests on the heart have been finalized — it definitely belonged to Charles-Louis. The young prince died tortured and alone in his room.
Andi reads Alex's final entry to discover the young woman had been shot by police as she set off her fireworks. The Duc d' Orlèans appeared to her in a vision and mocked what he thought was her futile devotion. He said the world would never change; it would go on being brutal and stupid. With her final breath Alex tried to explain that he is wrong. The world may not change but she —
The writing ends there. Andi realizes she will never know if Alex died then, but she does know the prince died. She realizes she had come to deeply hope they had survived. It ignites her grief about losing her brother, and she stumbles out of the apartment. She carries her guitar, but she is not looking for music to bring her comfort. Instead, she races to the Eiffel Tower, determined to finally end her life; but the guard won't allow her in the elevator with her guitar case. She is looking for a place to hide it when Virgil appears.
He tries to get Andi to explain why she's still in Paris, but she's in no mood to talk. She gives him her guitar to hold. When he says he has to leave to play a gig, she tells him to keep it. He realizes what she intends to do. At that moment, the guard announces that the last elevator to the top is full. Andi begs to be let on, but the guard threatens to call the police at her tantrum. Virgil carries her away and forces her to come with him into the catacombs to play at a party.
Virgil eventually gets Andi to open up about her pain. She tells him how she was supposed to walk her brother to school, but one morning her friend Nick coaxed her into skipping class and getting high with him. Truman begged her not to go, but she convinced him he could walk the rest of the way to school alone. A mentally disturbed man, irate because he was being evicted, grabbed Truman and held a knife to his throat. Andi had been waiting for Nick outside a store when she heard the police sirens. When she went to investigate, Truman saw her. He tried to run to her and got cut by the knife. A cop panicked and drew his gun. The paranoid man, still holding Truman hostage, ran into the street, where they were both hit by a delivery van. Andi has carried the guilt of that day with her for two years. Virgil tells her that it wasn't her fault. The man killed her brother, and now she was letting him kill her, too.
When Virgil goes to find his friends so he can tell them he's leaving with Andi, another man approaches her. He is dressed in old-fashioned clothing and looks vaguely familiar. He wears a ribbon around his neck, reminiscent of a story G told Andi about how the relatives of those beheaded attended parties and wore ribbons in memory of their loved ones. The man asks Andi strange questions about her iPod and the guitar she plays. Just then, someone yells that the cops are coming, and the party erupts in turmoil.
Andi loses sight of Virgil, and she ends up following the strange man through the catacomb. She is hit on the head by someone's bag and becomes disorientated. As they run through the tunnels, she is overwhelmed by the stench. Instead of the layered bones of the dead, the area is filled with decaying bodies. The man introduces himself as Amade´ as they reach the upper streets of Paris. Andi realizes that all the people are wearing clothes from the revolutionary period, and there are no streetlights and no cars. When the man takes her to his house to inspect her head wound, she realizes that he is Amade´ Malherbeau, and she has somehow traveled through time. She also comes to perceive that others see her as Alex.
When she sees the temple prison where Charles-Louis is being held, Andi longs to give him comfort. She begins singing as loud as she can in the street, hoping he can hear her. The police beat her, and Amade´ takes her back to his apartment. She tries to convince him she's not the Green Man, but he doesn't believe her. He takes a portrait down from the shelf, and she recognizes the people from the painting she'd seen in his house. He explains that they were his parents. He was born nobility. His parents were arrested as monarchists, but his father managed to save his son's life. Amade´ changed his name and came to live in Paris. It is his sadness that inspires his music, but he hasn't found the right combination of notes to truly express it yet.
Andi goes out into the night to light fireworks for Charles-Louis. Amade´ is angry with her recklessness and takes her to view a beheading, hoping to scare her into giving up her illegal activities, but to no avail. Andi recognizes the date on a newspaper as the day Charles-Louis died. She sets off two-dozen rockets, hoping he will find some comfort in them. She watches them burn too long. The police stop her for questioning. She escapes, but only after being shot. Amade´ finds her and guides her into the catacombs to hide. He echoes the same words Orleans spoke to Alex — that her efforts were in vain. She will die. The prince will die. The world will continue to go on, brutal and stupid. Andi knows then what Alex wanted to say in her diary. The world may go on, brutal and stupid, but she will not. She has been changed.
Virgil wakes Andi up. She tries to explain what happened to her, but he thinks she's suffering from her head wound. When they leave the catacombs, she discovers she's only been down there about an hour, not the days she'd experienced in the past. The book ends with an epilogue from a year later. Andi and her mom have moved to Paris. Andi plays her guitar for kids in the hospital to comfort them. Andi wrote her thesis and not only traced the musical influences of Amade′ Malherbeau but also proposed his relationship to French nobility. She also claimed that a young woman who set off rockets to comfort an imprisoned prince inspired his most-famous work, Fireworks. The thesis and Andi became famous. She applied to and got into the Paris Conservatory. She and Virgil are now inseparable. Andi has learned the lesson Alex wanted to teach her. The world may go on, stupid and brutal, but she does not have to go on that way with her life.