The film follows the adventures of Roy Miller (Tom Cruise), a spy on the run, and June Havens (Cameron Diaz), a car refurbisher. Miller is seen watching Havens, and he bumps into her a couple of times as they go through security at Wichita Airport. Havens is making her way back home to Boston from Wichita, Kansas after picking up spare parts for her deceased father's classic Pontiac GTO car, that she is restoring for her sister as a wedding gift. Even though she has a confirmed reservation for her flight, she is told at the gate that it is overbooked. Miller, able to board, whispers to her that "sometimes things happen for a reason". Unbeknownst to Havens, Federal agent Fitzgerald (Peter Sarsgaard) is monitoring Miller's movements and, believing she is working with Miller, puts her back on the flight list.
On board the flight, Havens notices that there are only four or five other people present. She relaxes with a drink, and chats about her dream of someday driving to Cape Horn while Miller checks out the other passengers. She is charmed, and goes to the restroom to freshen up. While she is occupied, Miller is attacked by the remaining passengers and crew. Miller kills them all, including the pilots. After she emerges from the restroom Miller calmly informs her that everyone onboard is dead. Thinking that he is joking, Havens plays along until Miller enters the cockpit. In a spell of turbulence, she notices the dead bodies falling over in their seats, and spilling into the aisle. Miller lands the plane on a highway, but skids off the road into a corn field trying to avoid a semi-trailer Truck. Miller gives Havens a drink, and explains that she may be questioned by various officials. She is not to get in any vehicle with them, nor accompany them if they suggest taking her away to a "safe" place. Havens passes out due to a knock-out drug in the drink, but awakes at home amongst clues that Miller brought her there, ensuring her safety.
Havens struggles through the day trying on bridesmaid dresses for her sister, April's (Maggie Grace) wedding. Talking over what to do with their dad's GTO car Havens is shocked to learn that April wants to sell it. She is lured out of the shop and is accosted by a group seeming to be FBI special agents who, with assurances that she will be safe, drive her away. She is shown some files pertaining to Miller, and is questioned by the agents to determine if she is working with him. Suddenly, Miller shows up, and with much shooting and acrobatics, "rescues" Havens.
Havens doesn't know who or what to believe and flees to the firehall, where her former boyfriend, Rodney (Marc Blucas), works as a firefighter. Upon hearing her story he thinks she is merely stressed from the wedding, and takes her out for pie. While they are chatting, Miller arrives and kidnaps Havens. He handcuffs her and shoots Rodney in the leg, telling him this will all turn him into an overnight hero and virtually guarantee his desired promotion to lieutenant.
Miller explains that Havens is safer with him; and Havens agrees to follow him as they go to pick up Simon Feck (Paul Dano), a genius inventor who created a perpetual energy battery called the Zephyr. They arrive at a safe house in Brooklyn where he left Feck. He is missing, but has left clues that he can be found on a train in Austria. The two are immediately ambushed by men belonging to Antonio (Jordi Mollà), aSpanish arms dealer. After Miller again drugs Havens, she drifts in and out of consciousness between their capture and escape from Antonio's men. Miller brings her to an island that is off the grid, which he calls his home. After leaving Miller in frustration to wander the island, Havens notices a message on Miller's cell phone with a Boston address. While studying this, her cell phone rings, showing her sister's caller ID. In answering the phone, she accidentally leads Antonio's group to the hideaway. They try to kill Miller and Havens with aremote drone.
Again knocking out Havens, this time with a neck pinch, Miller transports them to a train heading through the Alps. Havens awakes alone and, missing a message from Miller, leaves to get breakfast in the dining car where she encounters Bernhard (Falk Hentschel), a Germanassassin whom she believes is Feck. When she finds the message stuck to the bottom of her shoe, she realizes that Feck is with Miller, and Bernhard is someone else. Using tricks learned from Miller, Havens manages to survive, and Bernhard is eventually knocked out of a window by Miller and killed by a train coming from the opposite direction.
Miller puts Havens and Feck up in a hotel in Salzburg, Austria, and heads to a meeting with a mysterious beautiful woman. Havens follows him, and hears him make a deal to sell the Zephyr to Antonio. Havens is picked up by the CIA and meets the director of counter-intel, who confirms that Miller is a rogue agent, and gives her a pen transmitter to signal them when she is with Miller and the Zephyr. Miller meets her back at the hotel, and shows her the Zephyr, which is now showing signs of overheating. Havens uses the pen to notify the agents, which Miller notes "hurts more than I thought it would," but Miller escapes to the roof-tops. After leading the CIA agents on a chase, Miller is apparently shot and falls into the Salzach River. His body is not recovered, nor is the Zephyr.
Havens is sent home by the agents in time to stand at her sister's wedding. When Havens hears the song that Miller used as his ring-tone, she heads to the address she remembered from his iPhone. She meets the people at the address, and realizes that they are Miller's parents. Havens learns that Miller's real name is Matthew Knight and the couple believe their son, a former Army Ranger Captain and Eagle Scout, is dead, and they are fabulously wealthy from winning lotteries and sweepstakes they don't remember entering. They mention that their son was an excellent swimmer who could hold his breath for an amazing length of time, which leads Havens to realize Miller is still alive.
Havens leaves the Knights, and calls her own voice mail, leaving a message that she has the Zephyr. She is quickly captured by Antonio's men and taken to Spain. She is drugged with truth serum, which makes her relaxed and happy and leads her to reveal that Miller feigned his selling of the Zephyr and his death to allow her to return home. Antonio realizes that she doesn't have the Zephyr, and the only way he can get the device is to pay Fitzgerald who has kidnapped Feck. Miller has been following Feck using a tracking app on his iPhone, and stumbles upon Havens in the Spaniard's compound. Havens is rescued as she is being taken out for execution. Under the influence of the truth serum, she admits to Miller that she wants to have sex. After telling her to hydrate to rid herself of the effects, Haven believes Miller isn't happy to see her. He walks over to her in the midst of gunfire, says he is happy, and kisses her. They pursue Fitzgerald and Feck on a motorcycle, while eluding Antonio's men during the Running of the Bulls, during which Antonio is trampled to death by some bulls.
Fitzgerald is able to escape in an amphibious plane with the now extremely hot Zephyr while Miller is hit in the chest by a bullet as he saves Feck. Feck comments that the battery is unstable. As they watch the plane climb, the battery explodes, killing Fitzgerald.
Miller collapses from the gunshot wound, but wakes in a hospital. He receives an apology from the director (Viola Davis), who tells him that he rooted out a corrupt team. He asks about Havens, and is told that she has returned home. He is warned that he can't be distracted, and must forget her to continue with his job. The Director also explains to Miller that the agency will "transfer you to a secure facility tomorrow, for your safety" using the same wording that he warned Havens about. As they leave, a nurse enters, and gives Miller his medication. Miller realizes that he's been drugged, but then sees that the nurse is Havens.
Miller comes to in the rebuilt classic car that belonged to Havens' father. After he asks what day it is, Havens kisses him and says it's someday. She drives off, traveling along a coastal road past a signpost for Cape Horn. The final scene shows Roy's mother telling her husband that they have just received two tickets to Cape Horn. Though she blames her husband for ordering them by mistake, she insists that they go.