Sherlock’s Andrew Scott will star as Charles Dickens in a new comedy about the medical revolution in Victorian London.

BBC Two’s Quacks sees the actor swapping his role as the detective’s conniving and chilling nemesis Jim Moriarty for one of the most famous writers in history.

Scott guest stars alongside previously announced cast Rory Kinnear, Rupert Everett, Mathew Baynton, Lydia Leonard and Tom Basden.

Andrew Scott
Andrew Scott (Anthony Devlin/PA)

Quacks is set in the 1840s, at a time when Dickens was a celebrity both for his literary prowess and as an influential social campaigner.

But when one of his admirers, campaigner Caroline (Leonard) – the wife of leading surgeon Robert (Kinnear) – meets him at his house, Dickens is far from how she expects him to be.

The comedy follows the lives of four pioneers who are fighting to make their mark on the world with their medical advances and daring techniques, all the while saving lives and defying their rivals.

Quacks
Quacks, starring Mathew Baynton as William, Rory Kinnear as Robert, Lydia Leonard as Caroline and Tom Basden as John (Todd Antony/BBC)

Quacks will also focus on the spectacle that saw doctors flaunting their medical skills as entertainment in a theatre in front of an audience, with operations such as amputations up for viewing.

James Bond and Black Mirror star Kinnear said: “The surgeon would do one show a week, so there would be one public showing, and they would usually try and get the goriest or the most pioneering or the most exciting.

“Obviously when the big crowds were in, you wanted to do your best job, and you wanted to make sure they didn’t die.

“And there is an element of playing to a crowd, sometimes introducing the type of surgery, what the patient is, what the problem is, and Robert loves it.”

Quacks
Rory Kinnear as Robert (Todd Antony/BBC/Lucky Giant)

Kinnear said his pompous surgeon character is the “biggest arse anybody’s ever played”, but that he is “justified” in his arrogance, due to his status as one of the top surgeons in London.

Away from the medical shocks and horrors, the comedy sees Caroline and psychiatrist William – played by The Wrong Mans and Horrible Histories star Baynton – engage in an affair behind Robert’s back.

Plebs star Basden plays dentist turned anaesthetist John and film and TV mainstay Everett plays Dr Hendrick, in the series penned by James Wood, who co-created Bafta winning TV comedy Rev.

Wood said: “(The surgeons) were the rock stars of their day. They could take a leg off in less than a minute, and they had to because there was no anaesthesia.

Quacks
Rupert Everett as Dr Hendrick (Todd Antony/BBC)

“It was before they found out about germs so people used to pay to go into the operating theatre to see operations.

“In fact, we call it an operating theatre because you could go and watch. People would smoke during it, eat pies and watch someone go and have their leg sawn off by a rock-and-roll surgeon.”

Quacks begins on Tuesday August 15 on BBC Two at 10pm, and the whole series will be available to watch on BBC iPlayer after the first episode has aired.