Writer and director Michael Crichton based his book and movie, only loosely on the actual crime committed in 1855. In real-life, there were four criminals: Pierce, Agar, the railway guard Burgess, and a railway clerk named Tester. All four keys were kept on railway premises, two in London, and two in Folkestone. They were stolen temporarily by Tester and Pierce, respectively, so that Agar could duplicate them, but it turned out that the Folkestone keys were not being used anyway. The guard's van was not locked from the outside; Pierce and Agar were let in by Burgess, and a share of the loot was handed out to Tester, at stations. None of the criminals were spotted at once; it was several months before the railway conceded that the crime must have occurred on the train. The details came to light after Agar had been convicted in an unrelated crime, and his accomplices decided to steal his share instead of using it, as he had asked, to provide his mistress an income. She got word to him, and he turned Queen's Evidence against the others, and told all. At no point in the case, did anyone escape from custody.
Sir Sean Connery spent several days running on top of a moving train. The train was supposed to be travelling at thirty-five miles per hour; Connery argued it was going faster. The train driver was counting telegraph poles to measure the speed. A helicopter pilot confirmed Connery's suspicion. The train was travelling at over fifty-five miles per hour.
The character of Clean Willy was played by one of Britain's premiere ballet dancers, Wayne Sleep, from The Royal Ballet Company. He did his own stunts, including scaling the Newgate prison walls, at the tremendous risk of falling and hurting himself.
The roof of the train cars that Sean Connery had to walk and run on was treated with sand to avoid him slipping.
In a 2011 BBC radio interview, Wayne Sleep (Clean Willy) told how he was asked by Michael Crichton to climb a sixty foot wall. Sleep's response was "I'm an actor, not a stuntman." When Crichton explained that they had not been able to find a stuntman small enough (Sleep is 5'2"), Sleep made the climb anyway.