In 1861, as the country seethes with unrest in the wake of the Presidential election, John Kennedy, a New York police officer who briefly served as Abraham Lincoln's bodyguard, becomes convinced that there will be an attempt on the newly elected President's life as Lincoln's train passes through Baltimore on his way to his inauguration in Washington, D.C. When Kennedy's report is rebuffed by Simon G. Stroud, his supervisor at the police department, he angrily resigns his post, sends his report to the War Department and then boards the Night Flyer Express bound for Baltimore and Washington. Kennedy's friend, Inspector Tim Reilly, was to meet him onboard with his ticket and suitcase, but when Kennedy arrives, Reilly is nowhere to be found, although Kennedy's suitcase has been delivered. Scrambling to buy a ticket at the ticket office, Kennedy discovers that there are none left. As the train pulls out of the station, Kennedy makes a mad dash and jumps onboard. While scouring the train for Reilly, Kennedy finds his friend's body dangling from an observation platform. After Reilly's body slips from the onrushing train, Kennedy stalks the train corridors and encounters Col. Caleb Jeffers, a Northern militia officer who is traveling to Baltimore to lead his troops in a procession. Upon returning to his seat, Kennedy sees a stranger wearing his coat and holding his ticket and gun. When the stranger tells conductor Homer Crowley that he is Kennedy, Kennedy takes Crowley to Caleb's compartment, where Caleb identifies him as the real Kennedy and offers to share his compartment. As Kennedy prowls the corridors in search of a gun, he feels a pistol pressed against his back. The stranger then escorts Kennedy to the rear of the train, and when the train stops, ushers him off. Kennedy overpowers the stranger and wrests the gun from him. As the train powers up to depart, Caleb hears the sounds of the scuffle and shoots the stranger. After Kennedy rejoins Caleb onboard, Caleb hands him a pistol and Kennedy then tells him that before dying, the stranger divulged that he was to meet his contact in car 27. Proceeding to car 27, a club car, Kennedy and Caleb find Mrs. Charlotte Alsop, an abolitionist novelist, interviewing Rachel, the slave of Lance and Ginny Beaufort. Resentful of Mrs. Alsop's intrusive questions, Lance, an officer in the Confederate Army, voices his hatred for Lincoln and storms out of the car. After he leaves, Lance's sister Ginny explains that the family plans to detrain in Atlanta so that Lance can resign his commission. When the train stops in Philadelphia, Caleb and Kennedy return to their compartment. After Kennedy stretches out on his berth, his head shrouded in a newspaper, Caleb tries to shoot him, but Kennedy has emptied his pistol. Now realizing that the stranger was Caleb's accomplice, and that Caleb was aiming at Kennedy but hit his own man by mistake, Kennedy takes Caleb into custody and turns him over to a Philadelphia police officer. When Caleb shows the officer his military credentials, Kennedy asserts that Lt. Coutler at police headquarters can vouch for his authority. As Coulter is summoned, orders come to delay the train until a package can be delivered. While the train is waiting, Mrs. Gibbons, a mysterious passenger who has been closeted in her compartment with her invalid husband, steps out for air. Soon after, Lt. Coulter arrives with a message from Stroud denying that Kennedy is a member of the police force. Overpowering Coulter, Kennedy flees and hides on the roof of the train. Once the package is delivered, the train starts moving and Kennedy slips back inside. As the train speeds into the night. Rachel motions for Kennedy to come to her cabin and confides to him that Lance is carrying a rifle with a scope. As Rachel hands Lance's gun to Kennedy, Ginny overhears them whispering, slaps Rachel and then grabs the gun from Kennedy. Ginny then summons Lance, and after striking Kennedy unconscious, he admits that he is one of the assassins plotting to kill Lincoln as his train passes through Baltimore. Lance drags Kennedy to Caleb's compartment, where the conspirators bind and gag him. When the train stops at Wilmington so that a team of horses can pull it into Baltimore, a barber boards to shave Caleb. The barber, an accomplice, explains the details of the assassination plot. As the train pulls into Baltimore, word comes that Lincoln's train has been diverted. Leaving Kennedy in Lance's custody, Caleb detrains, and soon after, realizes that the delayed package was only a ruse to hide Lincoln in Mrs. Gibbons' compartment. As the train slowly pulls out, Caleb scrawls "the man is on the train" on the dust of Lance's car window. Noticing the message, Lance places Kennedy in Crowley's custody and leaves to retrieve his rifle. After reading the message, Kennedy overpowers his guard and runs after Lance. As they struggle, Kennedy pushes Lance off the train and onto the tracks. Soon after, Mrs. Gibbons appears and identifies herself as an undercover agent with the War Department. After congratulating Kennedy on saving Lincoln's life, she states that Kennedy's report spurred the War Department to undertake measures to secure Lincoln's safety.