On the eve of the 200th anniversary of Charles Dickens's birth, BBC1's post-Christmas costume drama treat is a new adaptation of Great Expectations. Very proper, you might say, a solid classic to look forward to after all that frothy festive cheer. But it also has something unexpected about it: an extra dash of actual Dickens. For alongside stars such as Ray Winstone and Gillian Anderson is 28-year-old Harry Lloyd, who plays Herbert Pocket and who happens to be a direct descendant of the author.

That Lloyd is the great-great-great-grandson of Charles Dickens is the sort of coincidence that belongs in a novel. The family link is through his mother, Marion Lloyd (née Dickens). She is descended from the seventh of Dickens's 10 children, Henry Fielding Dickens. Henry himself had five children, one of whom was Gerald, Lloyd's great-great-grandfather.

It might all seem far away and long ago but the pull of the family is still strong. Lloyd arrives jet-lagged for our interview because he's flown back from New York overnight to attend a big Dickens family lunch. "The best thing is I have a connection with second cousins whom otherwise I might not have an excuse to get together with. There's a central bureaucracy, because there are lots of organised people in the family."

This is a talented tribe who have overcome, each in their own way, the difficulties of living in the shadow of such a famous author. For a long time, no one was allowed to be a writer. According to Dickens's great-granddaughter, the late novelist Monica Dickens: "Dickens was God. It was like someone coming along after Christ and saying they were Christ too." For Lloyd, "it's like being born with an extra finger - it's just one of the things I came with".

Lloyd grew up in an arty family in Hammersmith - his father, Jonathan Lloyd, is a literary agent, his mother Marion is in children's publishing and sister Poppy is a radio producer. Actor Gerald Charles Dickens and writer Lucinda Hawsley are cousins.

Lloyd has always been in thrall to his ancestor. "As a child I was fascinated by the stories of Dickens acting out everything in front of the mirror as he wrote it down. Later, when you approach his work as an actor, you notice how sayable the dialogue is. Even with a book like Our Mutual Friend, which has 100 characters, they've all got their own own dialect, their own idiosyncrasies."

His first professional role, aged 15, was playing the bully Steerforth in the BBC's David Copperfield, opposite fellow unknown Daniel Radcliffe. Then for years he avoided doing another Dickens, paranoid that he had won his first part thanks to the ghostly family tie. But now he has found the confidence to work with that accident of birth. After playing rent boys and Italian immigrants on stage and screen he can finally relax: "I can think: 'Oh, okay, I'm doing all right at it. It's not all nepotism'. Now I can enjoy it."

Lloyd admits that he has read more Dickens than most of his relatives, and actually did his thesis at Oxford on him. "It made me start reading very early. Not because I'm related but because I'm quite bookish," he adds carefully. "His biggest influence on me is I'm a fan."

For all the "energetic, whizz-bang" style, he emphasises that Dickens is the great social reformer, who wrote about childhood mortality, poverty and prostitution in London. "It's always crude to link Dickens back to the blacking factory where he was sent to work aged 12 when his father was imprisoned in Marshalsea Prison for bad debt, but it was obviously a huge part of him."

In Great Expectations, Lloyd plays Herbert Pocket, Pip's great friend, who teaches him to become a gentleman when he comes into his fortune. The starry cast includes Ray Winstone (Magwitch), Gillian Anderson (Miss Havisham) and Douglas Booth (last seen playing the young Boy George) as Pip. Shot in a gritty palette of grey and blue, it is a long way from safe chocolate box Dickens, though everyone is ludicrously beautiful.

"The director of photography is this young German, Florian Hoffmeister, and from the opening shot of the marshes, so desolate and visceral, you can tell it's going to be really fresh," Lloyd says with relish. "After all, this is a really f*****-up tale of a woman who brings up an orphan purely to wreak revenge on men because she was jilted. It's like a Freudian nightmare."

Lloyd never went to drama school. Like Eddie Redmayne and Tom Hiddleston, he began his acting career at Eton. He chose to study English at Oxford, thinking, "if I don't use this bit of my brain, it'll shrivel and die". But he spent most of his time acting in plays and living in down-at-heel Cowley ("The posh boy trying to get real...").

After university he was Will Scarlett in BBC1's Robin Hood; then a schoolboy possessed by aliens in Dr Who. Writer Russell T Davies sent a note to the casting director, saying: "That's the next Doctor. Seriously. He's so brilliant." For a time he was one of the rumoured forerunners to replace David Tennant. More recently he was the ruthless Viserys Targaryen in HBO's Game of Thrones. He claims it is easier for him to work in the US because they don't have the same "priggish" obsession with class. "They don't have those boxes. No one cares where you're from. Coming from such a strong, defining background I worried people wouldn't be able to see anything else. I went to prep school, Eton and Oxford. When people hear that, they think they know you, and you think: 'No, you don't'.It wasn't that I was on a conveyor belt, sent away by parents. They were all completely brilliant establishments and I got the best education money can buy. But I didn't adopt the accent I might have done, and when I went home and got my hair cut I was constantly dreading them asking which school I went to. I wanted to be normal. I wanted to leave at 21 and have a blank canvas."

It was a personal triumph when he was cast as the gay rent boy who falls in love with a Hollywood actor in The Little Dog Laughed (with Rupert Friend).

Lloyd was also the young Denis Thatcher in the new Margaret Thatcher biopic, The Iron Lady, with Meryl Streep. Tall, dark, with killer cheekbones, he doesn't remotely resemble Denis in his twenties - or even Jim Broadbent, who plays the older Denis.

But with fake teeth and a high hairline, Lloyd is almost unrecognisable. Yes, his good looks shine through. But Lloyd thinks - since the film is shot from Mrs T's perspective - perhaps the Iron Lady did like to think she'd married quite a dashing businessman after all. "Alex [Roach] and I are not playing Margaret and Denis, we're playing the older Margaret's memory of him. It's very much her story and everyone else is a figment of her imagination."

He grew fond of Denis. "In a way he reminded me of my granddad. I recognised that humour and way of treating your wife - that completely loving, supportive mockery."

When he's not filming, Lloyd lives in Spitalfields. Like his ancestor he walks the streets late at night, listening to people, noting all the different jargon and patois and ways of dressing. "I love being in a city where you can turn the corner and be in a different century, or a different country. I like how close to the surface it is in the East End, with its courtyards and alleyways. Before shooting Great Expectations, I went to Barnard's Inn, where Pip and Herbert live, and Little Britain, where Jaggers is based. You realise Dickens's London is really solid, not some made-up magical kingdom."

Great Expectations is on BBC1 from December 27 to 29 inclusive. The Iron Lady opens on January 6