Harry and Archie successfully steal the Gold Coast Flyer and escape to Mexico.
In 1955, Harry Doyle and Archie Long robbed the Gold Coast Flyer train, becoming the last men to rob a train in the US. They were captured and sentenced to 30 years in prison. 30 years later, Harry (Burt Lancaster) and Archie (Kirk Douglas) are released and are trying to acclimate themselves into present-day Los Angeles. They are surprised to learn that things are much different now than in 1955, such as discovering their hangout has turned into a gay bar, and the street they grew up on is now a slum. They eventually meet their probation officer Richie (Dana Carvey), who tells them that he is a big fan of theirs and specifically requested to be their P.O. Richie finds the 67-year-old Archie a job and a home at a flophouse, and the 72-year-old Harry a room at a retirement home. He also tells them that the law prevents them from communicating with each other for three years.
After going their separate ways, Harry goes to the retirement home and soon sees that it's run like a prison. In no time, he quickly leads a revolt against the management for better food and living conditions. He later meets an old girlfriend who also lives there, and they rekindle their relationship. While Harry remembers the past, Archie tries to embrace the present by trading in his pinstripe suit and hat for modern-day clothing. He soon begins a relationship with a young woman he met at his old gym, which is now an aerobics center. However, they soon break up because he can't keep up with her sexual needs. He also quits his job after one day due to his feeling disrespected by the youth. While all this is happening, Harry and Archie are being followed by Leon (Eli Wallach), a hitman who was hired to kill them but they were sent to prison before he could do the job, and he has been waiting to kill them ever since. They are also being hounded by Yablonski (Charles Durning), the cop who busted them back in 1955. He is convinced they will return to crime and wants to be the one to catch them again.
Despite their best efforts, both Harry and Archie feel that they don't fit in with society anymore. They meet, despite the order not to, and decide to go back to doing what they are good at, which is robbing and stealing. They decide to get their old gang back together to rob a bank, but they discover the gang members are either dead, crippled, or senile. On a whim, they decide to rob an armored truck, and are successful! However, the truck was empty, and the local media mock them for robbing an empty truck and say they had to be young guys disguised as elderly. A fed up Archie then decides to rob a train. Earlier, they learned that the Gold Coast Flyer, the train they robbed in 1955, is being retired. Archie wants to rob that train again, but Harry says no thanks. Archie says he's going to rob it anyway and escape to Mexico on it. Meanwhile, Leon has tracked down Richie, who refuses to tell him where Harry and Archie are. Leon then finds Harry's file and takes Richie with him to the retirement home.
Leon and Richie are at the home when Harry and Archie arrive, still being followed by Yablonski. Leon shoots at them but misses. In the confusion, Harry and Archie escape with Richie in Yablonski's car. It's here that Richie learns of Archie's plan. He doesn't believe that they will rob the train, and decides not to violate their probation. Harry also tells Archie that he still won't participate, so Archie takes Yablonski's car and goes to the railyards. The farewell run of the Gold Coast Flyer is that afternoon, and Archie parks the car on the tracks in front of the train. He boards the engine and points his gun at the engineer, and then sees Harry board the engine and do the same thing. Harry says he knew Archie couldn't do the job by himself and changed his mind about robbing the train. On the train are members of the media covering the farewell run, and Harry and Archie introduce themselves to them. While they are being interviewed, Leon arrives and holds everyone hostage. The police also arrive, and Yablonski wants to negotiate a surrender. Harry and Archie agree to release the hostages, but Leon won't go out without a fight and begins shooting at the police. During the shootout, the train suddenly begins to move forward again. The trio soon see that the new engineer is Richie.
Richie was surprised to learn that the train robbery was real, and feels terrible that the system let them down, forcing them to go back to being criminals. He wants to help them escape to Mexico. Harry and Archie are able to kick Leon off of the train, who vows to continue to chase them, even if it takes another 30 years. They also uncouple the train cars, leaving Richie behind. Archie quickly tells him to tell everyone he was taken hostage as well to stay out of trouble. As the train continues on, Harry and Archie realize the tracks end at the Mexican border. They speed up the engine, and with US Border Patrol agents shooting at them, and Yablonski following them in a helicopter, the train crashes through the border fence and stops inside Mexico. With them no longer in the US, Yablonski is unable to capture Harry and Archie and he flies back to LA. Just as they get off of the train, Mexican Federales arrive to arrest Harry and Archie. The movie ends with Harry and Archie, proving to still be tough guys, kicking the cops in the groin.