A train makes its way through an Asian country while ahead, tribesmen prepare to blow up the tracks. The passengers notice that a man is approaching in a taxi:. The engineer finally agrees to slow down and MacGyver is forced to run to catch up. He finally makes it on board and the engineer speeds up.
His new passengers greet MacGyver as he presents his ticket to the conductor. MacGyver goes to get something to eat and notices a little girl staring at him. He makes a doll for her and then proceeds up ahead. Meanwhile, the head tribesman, Hassan, sees the train coming and signals ahead to his men to destroy the trestle.
MacGyver gets his sandwich and talks with a one-armed Dr. James Grant, who is busy drinking. He admits he was recently crippled and snaps at a woman, Andrea Collins, when she tries to help him. She works for the U.S. State Department as a courier and recognizes him as a man on a mission. He tells her that he hijacked proof of an illegal arms deal and needs to get it out of the country to thwart a war. Meanwhile, a young couple, Andy Ellis and Laura Dillon, argue about whether they should get married. Andy is impatient to get married despite the fact they’ve only met recently.
Dr. Grant returns to apologize to Andrea and she forgives him. He buys her a drink and accidentally bumps into Diana Kingman. Her mother and travelling companion, Eleanor, is less than impressed with Grant. They’re interrupted when the train approaches the trestle. The tribesmen ahead give a signal and two tribesmen on board take control of the train. When the conductor tries to stop them, they accidentally shoot him. Grant asks for and receives permission to tend to the conductor’s wound. Diana volunteers to help over her mother’s objections. The tribesmen insist they aren’t bandits, and have come to execute two men on a matter of justice.
As Dr. Grant tends to the conductor, MacGyver lures one of the hijackers toward him and then blinds him by spraying soda water into a bottle of salt, into the man’s eyes. Andrea distracts the other man long enough for MacGyver to get atop the train. He spreads alcohol around and sets it on fire, forcing the hijackers off the train. MacGyver then goes up front to inform the engineer what happened. He speeds up but the tribesmen detonate the explosives and destroy the trestle. The engineer stops the train just in time and Hassan and his tribesman surround the cars. One of the passengers, Kramer, hides a briefcase in a berth. In the engine, MacGyver rigs the engine switch with electricity to prevent anyone else from using it.
Hassan has his men assemble all of the Westerners outside, but Diana and Dr. Grant insist on staying. One of the hijackers, Badur, agrees to let them stay with their patient. Outside, Hassan has the locals taken away to his village then informs the other passengers that his village established a clinic and gave money to buy medicine from two Westerners. However, twenty-six villagers died from the contaminated medicine. Hassan doesn’t know which passengers sold him the medicine but he warns that the passengers must find out or they’ll be left to starve until they succeed.
The passengers consider their options and that night, Andy tells Laura that he plans to escape. MacGyver reassures Laura that Hassan won’t commit violence against them, but admits that the authorities won’t notice the train is missing for at least a week. He then makes a crude whistle as Andrea comes over to talk to him. Dr. Grant and Diana tend to the conductor and Diana helps Grant get a bottle of soda water open. She says she’s always been strong and admits that it’s been a detriment to her. Grant admits that he finds her an exciting woman and explains he was a surgeon until he lost his arm. She tells him he’s still a doctor and he explains he lost his arm when a drug addict burst into the hospital. Grant tried to take the gun and the man fired, disintegrating his arm. Diana admits she wants to feel useful. Grant says that she is useful and they kiss.
MacGyver briefly tries his whistle, upsetting Hassan’s horse. Hassan talks to him and asks after the conductor. MacGyver notes that he should have known someone would have been hurt during the hijacking attempt. Hassan explains that his son died first after demonstrating the medicine, but MacGyver warns that killing more people won’t bring his son back.
The next morning, MacGyver and Andrea greet the sun. Inside, Andy slips away while everyone else sleeps, unaware that Kramer is watching him. Andy goes outside and crawls underneath the train then runs for it. Kramer sees him and calls out. Hassan quickly runs Andy down. MacGyver attacks the tribesmen to distract them and uses his whistle on Hassan’s horse, then gets Andy back to the train. He and Laura embrace while another passenger, Webster, accuses Kramer of trying to set up Andy. Hassan orders a search and MacGyver suggests they search Kramer's compartment first. They find the hidden briefcase filled with paper money. Kramer claims he was afraid they’d steal the money and Hassan says that they paid in gold.
MacGyver gets an idea and builds a crude lie detector out of a blood cuff and an alarm clock. He tries it on Andy first and proves that it works. Andy explains that he ran away to save Laura and she admits she’s learned that she doesn’t want to be without him. Hassan is almost convinced and orders MacGyver to continue, but MacGyver refuses until he knows what the leader has planned. Hassan explains that he will give the men responsible the same medicine they sold to the village. MacGyver refuses to help, insisting it’s murder. He asks Hassan to come with them to the next village where the men will stand trial. Hassan agrees in the memory of his son. Webster disagrees with the decision and MacGyver invites him to take the lie detector test next. Webster lets himself be hooked up but fails to answer truthfully. His accomplice, the assistant conductor Lyman, draws a gun. Webster flees while Hassan grabs Lyman.
MacGyver chases Webster to the engine car and tosses his shoe up on top of the roof. He tries to sneak in but Webster isn’t fooled and knocks him out. MacGyver refuses to back down and tries to warn Webster not to touch the rigged switch. Webster doesn’t believe him and throws the switch, electrocuting himself.
Later, Dr. Grant treats Hassan’s wound and Lyman returns the gold. Hassan asks Grant to buy the proper medicines but the doctor says he needs an actual doctor. MacGyver points out that Hassan wants Grant as a doctor. Grant warns that he can’t handle it single-handedly but Diana volunteers to stay with him. Her mother tells her it’s about time and offers her help if they need it. The villagers bring back the other passengers and the little guy returns her doll to MacGyver, who congratulates Grant and Diana.