A naked man wakes in a clearing on a small island. Staggered, he dives into the ocean and is brought aboard by a ship manned by Khmer fishermen. The man speaks Khmer, even though he says he doesn't know the language. Also, he realizes that he sees completely in color. The ship puts to shore where paramedics tend to him and the man quickly rattles off comprehensive data on hands and fingers. He then estimates the day based on the position of the sun, down to the second. But he doesn't remember his name.
The man wanders into a police station to report a missing person – himself. When he doesn't have much luck, he sees his reflection in a mirror and sees a strange scar or brand on his shoulder. Despite his amnesia he is able to give a driver perfect instructions. The man goes to the information desk at a library to test himself, and is able to answer any factual question put to him. He draws a crowd but realizes he can't predict the future. The man manages to scrape up money from phone booths and vending machines and begins gambling at the races, using his knowledge to compute the statistical odds. He wins for a while, loses due to a random accident, then manages to make more money again from what's left. The man then invests his money to buy a suit of clothes, gets hold of an inactive social security number, and creates an identity as "John Doe."
John then invests in the future using his comprehensive knowledge and multiples his money even further, buying a car and realizing that while he doesn't know how to drive, he can learn with remarkable speed. Down at the docks, John notices a nearby bar and goes in, finding a piano. He is able to play the piano as a virtuoso even if he can't remember if he's ever played anything before. The owner, Digger, offers him a job and John accepts then buys a nearby loft. At the bar, John hears a news broadcast of a kidnapped girl, Jenny Nichols. John notices that he can see the girl in color and reveals it to the waitress, Karen Kawalski. Believing she's someone from his past, John goes to the police and meets with Lt. Frank Hayes, offering his help and establishing his credentials of knowing everything.
Hayes accepts his help and he and John review the security tapes. Jenny was kidnapped five hours ago from when she went to the bathroom. The police found nothing and John concludes she's alive, and they head for the school. John realizes she never left and uses his knowledge to identify the room as renovated, then determines a discrepancy in the room size from the building specs and spots a hatch in the floor. A man bursts out with the girl, spilling coins, and he and Hayes gives chase but the man escapes in an old Impala
Hayes' new boss Lt. Avery isn't thrilled with John's involvement and is skeptical of his vast knowledge of the crime. John finds a token marked "HK" in with the coins and then Jenny's mother comes over to thank him. Afterward John reviews all the facts but finds nothing that might connect to how he arrived on the island. But he does manage to track down the token, which goes into a washing machine. He then starts tracking down washing facilities looking for the specific model number, and gets a lead to a hotel where the clerk remembers the Impala. John breaks into the hotel room of the owner and checks out the drains and then the nearby garbage bin. Hayes and Avery get a different lead and head out while John finds a Swiss cigarette in the garbage. The cops bust into the house and shoot down a man when he fires on them, but he's a child pornographer with no connection to Jenny. John contacts Hayes but the police are skeptical of his theory, and John insists they have the wrong guy.
John analyzes the substances in the drain and finds a medicine for treatment of skin abrasions. Karen shows up while John breaks into the computerized Federal court archives and locates Evan Nichols, Jenny's father, who died two weeks after a warrant was issued for his arrest for embezzlement. Evan's photo matches the clerk's description. John goes to visit Jenny's mother and she talks about her drawings of a fantasy place, Emerald Cove. She reveals her husband, an insurance investigator, died in a car accident and she left him after he got in over his head. John confronts her with the sketch of Evan, then goes to the police to get a exhumation order. John examines the body and determines from the metal deposits that the dead man was a vegetarian and since Evan wasn't, the corpse isn't his.
The police close down all the routes out of town and they track down the Impala. They spot Nichols nearby and John and Frank give pursuit. Frank is badly gashed and John stops long enough to apply treatment, then sees Evan take off in a boat. John boards another helicopter and quickly masters it, then takes off in pursuit and lands nearby after Evan docks. John finds Evan with his daughter at a cover that matches the one she drew in the picture. Mr. Nichols reveals he's dying and John knows, based on the medicine and the signs of jaundice on Nichols' hat. Evan just wanted one last opportunity with his daughter. John insists on taking Jenny back, but agrees to let Mr. Nicholas get away. Jenny doesn't recognize John and he's left to wonder if his seeing her in color was just a random burst of color vision or something from his past.
John explains to Frank what happened and lies that Nichols escaped. Frank in turn apologies for doubting John. John then goes down to the morgue and chats with a corpse, a "Jane Doe," and brings himself to try a hot dog down at the docks. As he's walking away a woman on a ferry boat sees him – a woman who recognizes him as "Tommy." She tries to get his attention and yells his name, and John gets only a brief glimpse of her (in color) before the boat sails away.