Four heavily armed men, led by Bernard Ryder (John Travolta), board the New York City subway 6 train departed from Pelham Bay Park Station at 1:23 p.m., and proceed to take control of it.
Meanwhile, MTA dispatcher Walter Garber (Denzel Washington) is assigned to the Rail Control Center, due to an ongoing investigation that he took a bribe to recommend a Japanese car manufacturer for the next subway car contract. The group then uncouple the front car from the rest of the train and hold the passengers in this front car hostage. One of the hijackers, Bashkim (Victor Gojcaj), kills an undercover police officer in the course of the action. Ryder and a former MTA train operator named Ramos settle down in the front of the car, while the other hijackers watch the hostages in the back. They demand $10 million in ransom money to be paid within 60 minutes. For each minute past the deadline, one passenger will be killed. Garber and Ryder exchange conversations through the microphone, while his men set up a wi-fi booster apparatus to enable Ryder to access his laptop in the tunnel to watch the stock market plunge nearly 1,000 points during the next hour.
Unknown to him, one of the male passengers has an active laptop with a webcam, that was casually knocked to the floor, facing the car's interior previously when they took their hostages, which simultaneously reconnects using that same wi–fi link; reestablishing the feed to his girlfriend's desktop with whom he was videochatting; when she returns to her PC, she sees the hostage situation through her webcam and provides the live feed to a local television station. Garber agrees to have the city pay Ryder the $10 million ransom, after the Mayor (James Gandolfini) is intercepted by his staff aboard a train in the Bronx and is transported back to RCC.
NYPD Emergency Service Unit Lt. Camonetti (John Turturro) enters RCC, and Garber's boss, who has a rocky relationship with Garber, orders Garber to leave the premises. Camonetti takes over the hostage negotiations, infuriating Ryder, who demands that Garber be put back on the mic and that he will speak only to Garber. When Camonetti refuses, explaining Garber has already left the building, Ryder shoots and kills the train operator, who was Garber's classmate in motor school. Camonetti immediately has Garber brought back on the mic, talking to Ryder, while he sets up a sniper unit in the tunnel where the car is stuck, ordering all officers not to fire upon any hijacker until told to do so. Camonetti is puzzled as to why Ryder will only talk to Garber, but when he learns about Garber's bribery investigation, he asks Garber in consenting to search his home, which Garber agrees and tells his wife about it. Ryder learns through news reports about Garber's alleged bribe in Japan and forces him to confess by holding the boy with the laptop at gunpoint, saying the reason for taking the money was to pay for his kids college education but that the Japanese company was his first choice anyway. While the police stand down in the tunnel, a rat on the roadbed crawls up an officer's leg, causing him to discharge his sniper rifle, killing Ramos, who was sitting in the motorman's position.
The money is transported uptown to Grand Central and Ryder demands Garber to personally deliver it within 7 minutes. Garber calls his wife to inform her about his new responsibility, in order to save the hostages, but she cares only for his own safety. She makes him promise to pick up some milk on the way home, because he must come home safely. Garber delivers the money (An officer has loaned and concealed a 9mm pistol in one of the bags), then is ordered to operate the train to another location, where the hijackers exit. To ensure that the police go to the wrong location, Ryder uses a special mechanism to lock the driving lever in the full-speed position, bypassing the dead-man's switch and causing the train to accelerate and go down Coney Island at high speed.
The MTA are unaware of the mechanism holding the driving lever down and believe the hijackers and Garber to still be inside the train. Garber manages to escape from the hijackers and follows them to the emergency exit inside an abandoned subway station underneath The Waldorf-Astoria Hotel. Inside the hotel, Ryder splits away from Bashkim and Emri, who are surrounded outside the hotel by police; as they both reach for their guns, the police open fire on the two of them, killing them. The runaway train is tripped by a red signal one station away from Coney Island and the train comes to a halt safely. Ryder boards a taxi with Garber in pursuit. Ryder checks his laptop, where it is revealed that he has short–sold the market and invested in gold, earning him a profit far larger than the ransom money. Ryder goes to the Manhattan Bridge, where he leaves the cab, due to heavy traffic, and uses the pedestrian walkway on the bridge. Garber confronts Ryder on the bridge where Ryder demands Garber kill him before the police do. Ryder gives Garber 10 seconds to shoot him. When Ryder finishes counting to 10, he takes out his gun, but Garber gets the first shot out. Before Ryder dies, he calls Garber his "goddamn" hero.
The mayor thanks Garber for saving the hostages, and vows his staff in representing him in the bribery investigation. The Mayor then offers Garber a ride home in his car along with the escort service. Garber refuses the offer, saying the subway is faster and is his lifeblood. He then heads home with the last shot of the film being Garber, walking into his home holding a half–gallon of milk in a grocery bag.