The Secret Agent, an adaptation of Joseph Conrad’s political novel, was filmed in the world heritage site last year.
Thistle Street Lane, situated between George Street and Queen Street, doubles for 19th-century London in the three-part series, which stars Toby Jones, Vicky McClure and Stephen Graham.
Sets were also constructed at Newbattle Abbey in Midlothian, while Bakehouse Close in the Old Town, Gosford House in East Lothian and Hopetoun House in South Queensferry also feature.
In the show, directed by Charles McDougall for BBC1, Jones plays Verloc, whose seedy Soho shop hides his role as an agent of the Russian Embassy, spying on a group of London anarchists.
Furious that Britain tolerates violent extremists, the Russians want Verloc to provoke a bomb outrage that will trigger a government crackdown.
Caught between the Russians and the British police, Verloc drags his unsuspecting family into a tragic terror plot.
Producer Priscilla Parish said Edinburgh was able to provide “great period locations that arguably would be impossible to find in London”.
She added: “Thistle Street Lane is a long cobbled street with similar proportions/size of buildings to 19th-century Soho. The location also gave us a network of streets which really opens up the world of Soho and gives a feeling of scale. David Roger designed shop fronts and filled them with goods – second-hand instruments, a pawn shop, a couple of pubs.
“Verloc’s shop was at one end of the street, and 150m away at the other end was a music hall from which all sorts of characters emerge. There is a bridge spanning the street with its facade covered in an advertisement for the real 19th-century cemetery Necropolis train. Then it was a matter of populating the streets with people and animals. The finishing touches came in the sound mix – a mixture of languages, industry and streetlife.”
Tourism body VisitScotland said the new adaptation would help showcase the architecture of the Unesco World Heritage Site to potential visitors.
Jenni Steele, film and creative industries manager at VisitScotland, said: “ ‘Set-jetting’ is a hugely popular pastime and, with other stately homes around the Lothians also featuring, we hope that seeing these amazing locations in The Secret Agent inspires people to explore the historic areas of Edinburgh and the surrounding countryside.”
Rosie Ellison of Film Edinburgh, said: “We were thrilled to have attracted this production to the region. Thanks to the diversity and variety of our locations, combined with a skilled crew base and film-friendly procedures, Edinburgh’s appeal as a filming destination continues to flourish.”
The Secret Agent begins on BBC One tomorrow at 9pm. See page 21 for preview.