Sherlock and John face Moriarty at the pool, and he changes his mind and tells his men to kill them. As Sherlock aims his gun at the vest wired with explosives, Moriarty's phone rings. He apologetically asks if he can take it and Sherlock agrees. Moriarty hears what the caller has to say and screams at them, warning that if they're lying, he'll skin them alive. He then apologizes to Sherlock, telling him that it's the wrong day for him to die. Rather than explain who called, Moriarty simply tells Sherlock that he'll be hearing from him. He walks off, offering to make the caller rich if he or she has what he claimed. The snipers leave with their employer and Sherlock figures that someone changed Moriarty's mind.
In a private bedchamber, Irene Adler approaches a woman tied to her bed, addresses her as "Her Highness," and prepares to discipline her with a riding crop.
As the days and weeks move on, John updates his blog with their recent cases, while Sherlock tries to find a case that isn't boring. One man has the ashes of his mother but insists that they aren't really her mother, while two small girls wonder if their mother died. Lestrade calls them in on the case of a "speckled blonde," which Sherlock refuses to investigate. He's stumped by another of Lestrade's cases, about a suspected terrorist who brought down a flight in Germany, but died in a car boot outside of London. John continues to update his blog, much to Sherlock's chagrin since he'd rather post about tobacco ash than his failures.
At another case, Lestrade calls Sherlock and John to a theater. They try to slip out past the press, who are touting Sherlock as the ''net detective." He grabs a prop hat from a stand and tries to get out using it to cover his features, but fails. Irene Adler sees the photograph in the newspaper and calls someone, saying that "it's time."
Sherlock's next case arrives in the form of a shocked man, Phil, who arrives at their doorstep. He explains that his car stalled in the countryside. A hiker in a red jacket was standing in a nearby empty field, and didn't hear Phil when he called to him for help. Phil tried to start his car again and it backfired, and when he looked at the hiker a few seconds later, he was dead. Lestrade calls the DI in charge, Carter, and suggests that he let Sherlock examine the crime scene. However, Sherlock refuses to leave the flat and sends John with a laptop. John uses the laptop webcam to show Sherlock the scene, while someone keeps ringing the doorbell and Sherlock ignores it. The hiker is dead, apparently murdered, from a single blow to the back of the head by a blunt instrument. However, there is no such weapon present.
Sherlock dismisses Carter's suspicion that Phil is the murderer and directs the DI to check out the nearby stream. However, before Carter can do so, the two men at the door who have been ringing come in anyway. The lead man, Plummer, turns off Sherlock's laptop and tells him that he's coming with them. Sherlock, wrapped in a bedsheet with nothing on underneath, looks at Plummer and realizes where they're going.
At the field, John is surprised to discover that someone has sent a helicopter to transport him. It takes him to Buckingham Palace where he is brought in to see Sherlock, still in his bedsheet. Mycroft comes in and tells them that he has a case for them. When Sherlock says that he already has a case, Mycroft points out that the solution to the hiker's death is simple and his brother agrees. The Equerry comes in and tells them that his client, who wishes to remain anonymous, is a big fan of John's blog. Sherlock refuses to work for an anonymous client and tries to leave, even after Mycroft steps on his bedsheet and leaves him naked. When Sherlock keeps going, Mycroft finally admits that his client is the highest in the land.
Satisfied, Sherlock puts on his clothes and his brother tells him that they need him to recover some incriminating photos, and they can't trust the Secret Service or the police. Mycroft shows Sherlock photos of Irene and explains that she's been at the center of two scandals in the last year. Irene ruined a novelist's marriage by having affairs with him and his wife simultaneously, and that she is a professional dominatrix known as "The Woman."
Irene is at home and receives photos of Sherlock going into Buckingham Palace.
The Equerry and Mycroft reluctantly explain that Irene has compromising photos of a young female significant to their client. However, although Irene has admitted she has the photos, she hasn't asked for any form of payment. Intrigued, Sherlock agrees to take the case, tells Mycroft to text him Irene's address, and asks the Equerry for a box of matches. He points out that the Equerry's employer smokes but won't explain how he knew, and leaves with John. Outside, he tosses John an ashtray as way of explanation for his deduction.
Irene receives photos of Sherlock and John leaving Buckingham. She calls in her assistant Kate and tells her that they need to prepare for a visitor, and she'll need a long time to get ready.
Back at Baker Street, Sherlock goes through his closet of disguises and settles for a priest's collar. He and John then go to an alleyway two blocks away from Irene's apartment. Sherlock then tells John to punch him, and provokes his friend when he hesitates. John is soon eager to start punching Sherlock.
Kate finishes helping Irene with her makeup and then goes to the door when someone rings the bell. It's Sherlock, posing as a mugged priest. He asks to come in and call the police, claiming the muggers took his cell phone. When Kate lets him in, John comes in and claims to be a witness and a passing doctor. Kate takes Sherlock to the parlor and John to the kitchen to get the first aid kit. Irene then comes in to see Sherlock... completely naked. She greets Sherlock by name and removes the collar. Seemingly unmoved at her nudity, Sherlock greets her and ignores her initial flirtations. John comes in and is shocked, and Irene invites him to sit with them. As Irene sits down, Sherlock tries to observe her for clues but is stumped since she has nothing to give her away. They spar back and forth verbally until John finally asks Irene to put something on, and Sherlock offers her his coat.
Irene starts by asking about the dead hiker, explaining that she knows a policeman and what he likes despite the fact the case hasn't been made public. She says they might as well talk about the hiker since they won't get the photos. Sherlock realizes that the photos are in the room and tells John to man the door and carry out their plan. As he does so, Sherlock returns to the hiker's case and tells Irene that the backfire was significant because noises are important. The smoke alarm goes off as John lights a magazine, and Irene instinctively glances at a gilded mirror on the wall. Sherlock follows her gaze and explains that he knew she'd look at the most important thing to her first. He yells at John to shut off the fire alarm, but three men come down the stairs and shoot it out.
Unaware of what's going on outside, Sherlock examines the six-digit keypad lock. Still confident, Irene tells him that she's already told him the combination. The three men come in with John as their prisoner, and take Irene prisoner as well. Their leader, an American named Neilson, orders Sherlock to open the safe. He insists that he doesn't know it and suggests that they ask Irene, but Neilson figures that Irene has a second number programmed that will notify the police. When Sherlock is unable to open it, Neilson orders his man Archer to shoot John if Sherlock doesn't open it. Sherlock has no choice but to try and open the safe, and realizes what the correct combination is. He enters it but then ducks, realizing that Irene would have planted a trap. A mounted gun inside the safe fires, hitting Archer. Sherlock knocks out Neilson while Irene takes out the third man. Sherlock takes the camera phone out of the safe, goes outside with John, and fires two shots into the air to attract the police.
The two men go back in and Irene demands that they return the camera phone. She claims that she has copies but Sherlock doesn't believe her, and discovers that the camera phone has a four-digit security code. Meanwhile, John checks on Kate and discovers that Neilson and his men knocked her out when they broke in through a bedroom window. Irene suggests that John check the back door, and then injects Sherlock with a hypodermic once his friend has left the room. She whips him with her riding crop until he drops the camera phone, and then takes it and heads for the window. As John returns, Irene assures him that she only gave Sherlock a sedative and he'll recover in a few hours. She also points out that Sherlock was paying attention when she was naked, since the safe's combination was her measurements.
As Sherlock is taken back to Baker Street to rest, he imagines Irene coming in, returning his coat, and telling him that the hiker was killed by a thrown boomerang, which fell into the nearby stream and was washed away. He wakes up and John tells him that Irene wasn't there. However, as John leaves, Sherlock's cell phone rings from his coat pocket. The ring tone is a woman's breathy sigh. He checks the text message and discovers that it says, "Till next time, Mr. Holmes."
The next morning, Mycroft comes to see Sherlock, who assures him that the photos are safe with Irene. Mycroft doesn't believe it but Sherlock insists that he should leave Irene alone. Sherlock's cell phone rings again with the same breathy sigh and he takes it, while pointing out that Mycroft knew that the Americans, CIA-trained, would be there when Sherlock and John went to recover the photos. Mycroft takes a call and talks to someone about Coventry and Bond, while John asks Sherlock about the strange ring tone. While Sherlock tells his friend that someone personalized the caller ID, Mycroft finishes his call and his brother asks what Irene has that the Americans want. He figures that there is something bigger involved, but Mycroft tells him that Irene is no longer Sherlock's concern.
On Christmas Eve, Sherlock and John invite Lestrade, Mrs. Hudson, John's girlfriend Jeanette, and Molly to their celebration at the flat. Sherlock can't help deducting, pointing out that Lestrade's wife is having an affair and John's sister is still drinking. He also notices that the counter on John's web site has changed since the last time he saw it. Molly comes in and Sherlock spots one of her presents, and concludes from that and her fancy dress that she's going to see a boyfriend after their party. However, he then realizes that the present is for him. Molly starts crying and Sherlock actually apologizes, kissing her on the cheek and wishing her a Merry Christmas. However, Irene sends another text message and Molly apologizes, saying the sigh isn't hers. John points out that Sherlock has now received 57 separate text messages from the caller. The new one says "Mantelpiece," and Sherlock finds a present for him there. He takes it into his bedroom and discovers that it's Irene's camera phone. Realizing what it means, Sherlock calls Mycroft and tells him that they'll find Irene that night, dead.
Later, Mycroft and Sherlock go to the morgue to meet with Molly, who warns that the woman's corpse is badly beaten. Sherlock glances at the naked body and immediately confirms that it's Irene, much to Molly's surprise and suspicion. Out in the hallway, Mycroft offers his brother a cigarette and asks how knew Irene would turn up dead. Sherlock explains that he received the camera phone and knew that Irene chose to give it up. Mycroft focuses on the photos on the camera and Sherlock wonders why they don't care about death. Mycroft says that there's no advance to caring, and Sherlock walks away while wishing him a Merry Christmas. Once he's gone, Mycroft calls John and asks if he's found the camera phone. John hasn't, and asks if he should stay with Sherlock because he has other plans. Mycroft simply insists and cuts off. John apologizes to Jeanette, who angrily points out that he care more for Sherlock than her and then walks out.
When Sherlock comes in, he's well aware that John has checked his room for the camera phone. He starts playing his violin and doesn't stop throughout the week. When John tries to talk to him, Sherlock is more interested in the fact that the blog counter hasn't changed. He enters the counter number on Irene's camera phone and discovers that it's the incorrect code and that he only gets three more attempts. As John leaves, he asks Mrs. Hudson if Sherlock has had any kind of relationship, with a man or a woman, and the housekeeper points out that neither one of them know what goes on in Sherlock's head.
John leaves the flat and finds a beautiful woman that he doesn't recognize waiting for him. She asks if he has any New Year's Eve plans that night and John agrees. However, when a fancy car immediately pulls up, John assumes that she's another of Mycroft's representatives. They go to an abandoned factory and the woman directs John ahead to a power room. As he goes, she calls her employer and tells her that John assumed that she works for Mycroft.
John goes to the power room and finds Irene waiting for him. He insists that she tell Sherlock that she's alive, and then wonders how she faked the corpse. Irene tells him that she was able to fake the DNA records and asks for John's hope getting the camera phone. All she will tell him is that Sherlock is at risk while he has it and she made a mistake sending it to him. John refuses to help her and again tells her to tell Sherlock that she's alive. When Irene wonders what to say, she admits that she's been sending flirtatious text messages to Sherlock but he never replied. She asks John if he's jealous, and then gives in and sends Sherlock a text message inviting him to dinner. They hear the breathy ring tone outside and realize that Sherlock followed John there and knows Irene is alive.
Sherlock returns to Bake Street and discovers that the lock has been forced. Signs on the stairs indicate that three men grabbed Mrs. Hudson and hauled her upstairs. When Sherlock enters the flats, he finds Neilson holding a gun to Mrs. Hudson's head. He asks for the camera phone and Sherlock confirms that he beat Mrs. Hudson to get her to reveal its location. He tells the American to send his men out so they can negotiate and Neilson reluctantly agrees. Once they're alone, Sherlock tells Neilson to search him for a weapon and the American gets close enough for Sherlock to knock him out.
When John arrives home, he discovers that Sherlock has put up a sign saying "Crime in progress. Please disturb." Upstairs, he discovers that Sherlock has tied Neilson to a chair. Sherlock tells John to take Mrs. Hudson downstairs. Once he's alone with Neilson, Sherlock calls Lestrade and tells him that a burglar broke in, and he accidentally fell out the window. Downstairs, John is tending to Mrs. Hudson when Neilson falls past the window and hits the ground. Lestrade arrives and has his men take the injured Neilson away. Sherlock goes to check on Mrs. Hudson and makes sure that she's okay, and then has her return the camera phone that he left with her for safekeeping. When John suggests that she stay with her sister, Sherlock insists that Mrs. Hudson stay with them and she agrees.
Back in their flat, John asks Sherlock where he's rehidden the camera phone and Sherlock assures him that it's in the one place that no one will ever look. He wants to focus on the photos but John asks him how he feels about learning that Irene is still alive. Sherlock ignores the question and plays the violin as the new year comes in.
Irene is on the street when Sherlock sends her a text message wishing her a Happy New Year.
Sometime later, Sherlock goes to the morgue and uses the equipment to x-ray the camera phone. Molly wonders if belongs to his girlfriend, but Sherlock notes that it would be silly to x-ray his girlfriend's camera phone. He gets an idea and enters 221B as the code, but it also fails with two attempts remaining.
Back at home, Sherlock hears crying from his bedroom. When John comes home, Sherlock reveals that Irene is their new client. She tells them that there are people who want her dead and asks for her camera phone. Sherlock says that he rented a safety deposit box several months ago, and John assumes that the camera phone is there and comes up with an elaborate plan to get it to Baker Street. Sherlock congratulates him and then takes out the camera phone from his pocket. He asks Irene what's on it, but all she will say is that there are items on it she can use to protect herself.
Irene refuses to give Sherlock the passcode and he finally hands it over to her. She enters the passcode to confirm that it hasn't been tampered with, but Sherlock tells her that he gave her a duplicate. He enters the passcode into the real camera phone, but it doesn't work and Irene tells him that she knew immediately that the camera phone wasn't hers. Sherlock still has the camera phone and Irene finally explains that it contains an email from one of her clients, a Minister of Defense, who showed it off and claimed that it would save the world. The email has the title "007 Confirmed Allocation" and an alphanumeric character string. After a second's analysis, Sherlock explains that it's a seating chart for a 747 leaving Heathrow and going to Baltimore at 6:30 the next day. Impressed, Irene offers to make him beg for mercy during sex but Sherlock merely has John confirm his deduction. When John says that the 007 refers to the flight number, Sherlock realizes that it is connected to Bond and Mycroft's earlier phone conversation. He's unaware that Irene is sending a secret text message with the information to... Moriarty. When he receives the message, Moriarty sends a message of his own to Mycroft, dismissing the plan and stunning Mycroft.
Meanwhile, Sherlock concentrates and realizes that Mycroft was talking about the flight and Coventry. John leaves and Irene is there, and he explains that Coventry relates to World War II, when the Germans sent a coded message that they were bombing Coventry. The British intercepted the message but let the bombing continue rather than reveal they had broken the code. Irene takes Sherlock's hand and asks if he would like dinner, but he doesn't understand why they should have dinner if he isn't hungry. He takes her hand and strokes her wrist, and Irene asks if he would have dinner with her if it were the last night on Earth. Before he can answer, Plummer comes in and tells Sherlock that he'll be coming with him again, and gives him a ticket for Flight 007 to Baltimore.
As Plummer drives Sherlock to Heathrow, Sherlock explains that the British and the Americans both knew that terrorists had planted a bomb on Flight 007. Rather than give away that they had an inside source, both countries decided to let the flight continue and the bomb explode. When they arrive at Heathrow, Neilson is there and clearly unhappy that Sherlock is involved. Sherlock goes inside and discovers that all of the passenger seats are filled with long-dead corpses. Mycroft comes in and explains that he came up with a solution to the Coventry problem: send up a flight with dead passengers so that no one would be killed when the bomb would be blown off. Sherlock had already been inadvertently involved with the case, since the clients with dead relatives had people on the plane. The dead man in the trunk had inadvertently missed the German flight, which was brought down by the same terrorists. However, now the plan is in ruins because Sherlock decoded the email for Irene, and she sent the information to Moriarty.
As Mycroft apologizes for sending Sherlock after Irene, Irene comes in and casually brushes past Sherlock .She tells Mycroft that she has enough information on the camera phone to bring down the government. Back at Mycroft's office, Irene negotiates and warns that they can't get to the information without her. Sherlock is forced to confirm that the camera phone will self-destruct, and that Irene has at least two codes to give up in case she is tortured, and one of them will destroy the information. When Mycroft is willing to let the information destruct, Irene points out that some of it could save British lives. However, she refuses to confirm if that is the information she actually has. Irene gives Mycroft a list of her demands, which include a considerable amount of money, and insists on an immediate answer. As Mycroft considers, Irene explains that Moriarty is the one who told her how to play both Holmes brothers.
As Mycroft gives in and congratulates Irene, Sherlock interrupts and tells him to stop. He tells Irene that she got carried away and felt love for him. Irene says that she doesn't feel anything toward him, but Sherlock explains that earlier at the apartment he checked her pulse and eye dilation and confirmed that she actually had feelings for him. He then picks up the camera phone, telling Irene that she could have entered any random number and gotten away with her scheme. However, she let her heart ruler her head. When Irene tells him that nothing she said was real and it was all just a game. Sherlock tells her that she lost the game and enters the correct passcode: SHER. He gives the camera phone to Mycroft and suggests that they let Irene go, since she won't last six months without her "protection." Irene begs for their help but Sherlock merely says that he won't be able to have dinner with her and leaves.
A few months later, John finds Mycroft waiting for him. They go into the café beneath the flat and Mycroft shows John the file on Irene, including her camera phone. He tells John that Irene negotiated with the Americans and entered a witness relocation plan, and that the file is closed. John points out that Sherlock doesn't care and that he will only refer to Irene as "the Woman," but Mycroft concludes that Sherlock is using it as a title of respect. They both figure that Sherlock will be fine with the news... and then Mycroft says that it's the story they should tell him. The truth is that Irene was beheaded by a terrorist cell two months ago. He gives John the file and asks him what they should tell Sherlock.
Sherlock is hard at work, when John comes in and tells him that Mycroft has news about Irene. He hesitates and then gives Sherlock the story about the witness relocation plan. Sherlock tells his friend that he has no interest in seeing her, but does ask for the camera phone. John reluctantly hands it over and asks if Irene ever texted him again. Sherlock says that she sent one last message a few months ago, "Goodbye, Mr. Holmes." After John leaves, Sherlock brings up all of the text messages that Irene sent him.
Two Months Earlier
Irene is awaiting decapitation at the hands of the terrorist and sends her last message to Sherlock. However, the hooded executioner tells her that she should run. She looks up and realizes that it's Sherlock, and he starts swinging his sword at the terrorists.
Sherlock puts the camera phone away and smiles admiringly, muttering, "The Woman."