The 37-year-old, who plays Douglas Archer in the Second World War drama, fell in love with acting as a working-class boy at Uppingham School in Rutland.
He explained: “My great grandfather was a regular fellow who was very enamoured by his officers in the trenches during the First World War.
“He promised himself that if he lived through the war and made any money, he would send his son to Uppingham.
“So my grandfather and my father went there and then there was just enough money left to send me and my younger brother.”
He acted in school productions and during summer holidays in the sixth form spent time with the National Youth Theatre.
He went on to find fame as Joy Division’s Ian Curtis in 2007 film Control.
In tonight’s SS-GB premier, Riley plays a British detective forced to work under the SS.
Based on the Len Deighton novel, it imagines a world where England and Wales is under Nazi occupation after losing the Battle of Britain.
His character meets Kate Bosworth’s New York Times journalist Barbara Barga as an apparently routine murder probe evolves into something much more sinister.
Riley, who now lives in Berlin with his wife Alexandra Maria Lara and their son Ben, three, said he was immediately attracted to the part in SS-GB.
He said: “I’m a big fan of Philip Kerr’s Berlin Noir Trilogy about a private detective working in pre-war Berlin. I really love those books.
I was also attracted by the fact that Archer speaks German, and I’ve been living in Berlin for the past eight years.
As my dad and my agent put it, ‘People might actually watch this!’”
Neal Purvis and Robert Wade, the writers behind Bond films Spectre, Skyfall and Casino Royale, adapted the book.
Wade said: “It constantly makes you think:‘What would I have done?’
This example of alternate history is particularly interesting because it’s so close to what might have happened.
“In SS-GB, the British are living through the Occupation.
The game is still not over.”
SS-GB is on BBC One, tonight at 9pm