There was a scene in The Office in which Tim Canterbury, the benign sales rep played by Martin Freeman, compared his life to a roll of the dice.

"My situation now may only be a three. If I jack that in, go for something bigger and better, I could easily roll a six," he told the programme's faux documentary maker. "I could also roll a one. OK? So I think … just leave the dice alone."

Freeman, who will star alongside Benedict Cumberbatch in the eagerly awaited return on New Year's Day of BBC1's Sherlock, and as Bilbo Baggins in Peter Jackson's blockbuster sequel The Hobbit: The Desolation of Smaug next week, has just rolled a double six.

It has been an extraordinary rise for the 42-year-old actor, who first sprang to fame in BBC2's The Office in 2001 as one half of the nation's favourite sweethearts, Tim and Dawn (Lucy Davis).

"There's a brilliant ordinariness to Martin's character, an endearing low-level grumpiness, and he was able to tap into that [in The Office]," says the show's producer, Ash Atalla. "He is a very charming, slightly grouchy man-next-door who has become a superstar."

Freeman loathes the "everyman" label but it is a description that has stuck: an ability, as someone once described it, to present himself as the only normal bloke in a crazy, dangerous world.

The BBC's former head of comedy Jon Plowman, who executive-produced The Office, says: "He's great at playing the everyman, which is why he is so good as Watson and in The Hobbit.

"He's got a wonderful ordinariness which you'd think most actors would have but curiously they don't. That's not an insult – it's the absolute opposite – and if you've got it as an actor you bloody well hang on to it. Cary Grant and Jimmy Stewart, we like them because they are a bit ordinary and he has that quality. Tom Hanks has it in spades."

Proud of The Office, Freeman was also aware that the award-winning sitcom could be a curse. When he starred as Lord Shaftesbury in the BBC1 drama Charles II: The Power and the Passion in 2003 – the same year The Office ended – one newspaper featured a picture of him with the headline, "Tim in a wig".

Two years later, when he starred as Arthur Dent in the long-awaited big-screen adaptation of Douglas Adams' The Hitchhiker's Guide to the Galaxy, it was hard not to see him as Tim in space.

"It would be a shame for me if I were to become Mr half-hour sitcom," he has said. "I would not like to be Tim from The Office when I'm 50."

But then came Sherlock. When Steven Moffat and Mark Gatiss were casting Sherlock, their contemporary updating of Sir Arthur Conan Doyle's detective stories, they alighted immediately on Benedict Cumberbatch as Holmes. His sidekick, Dr John Watson, proved harder to find, remembers Moffat.

"We had seen a lot of very good people, but when we paired Martin with Benedict it was stellar instantly, you could see the show," says Moffat.

"Martin is very responsive to the performances around him and once they started bouncing off each other, I said to Mark: 'That's the show right there.'" (Moffat is also the showrunner of Doctor Who, and among the others who auditioned was the then unknown Matt Smith. Moffat would cast him as the Time Lord a few days later.)

The pair work, says Moffat, because Freeman is the flipside to Cumberbatch's "exotic-looking creature". "Martin is rather handsome but there is something about him which suggests he is just a bloke you might meet. If you are Sherlock or the Doctor you are being flamboyant and you are doing a turn; you have got a lot of space to manoeuvre in," adds Moffat. "John Watson isn't trying to attract attention, he's just doing what we all do – observe people."

Sherlock went on to win huge critical acclaim, in the UK and US, and its return on 1 January, when viewers will finally find out how Holmes managed to fake his own death, is one of the most keenly anticipated dramas of recent years.

But it nearly cost Freeman an even bigger role, as Bilbo Baggins in Peter Jackson's three-part adaptation of The Hobbit. The Lord of the Rings director knew Freeman from The Office and The Hitchhiker's Guide and was the "only person that we wanted for that role", even before he met him.

But delays to The Hobbit meant Freeman had already committed to Sherlock by the time Jackson could offer him a contract. With Freeman unwilling to turn his back on Sherlock, Jackson took the unprecedented decision of delaying shooting for two months so Freeman could make Sherlock before returning to New Zealand for The Hobbit.

"We just felt he had qualities that would be perfect for Bilbo," Jackson said. "The stuffy, repressed English quality. He's a dramatic actor, not a comedian, but he has a talent for comedy."

Although the first instalment of The Hobbit failed to win the plaudits of The Lord of the Rings, it was a huge commercial hit, making more than $1bn worldwide. Charles Gant, film editor of Heat magazine, says: "He is brilliant [in The Desolation of Smaug] and I was reminded how perfect he is in this part, a small, rather meek person who goes on this incredible expedition.

"There is nothing particularly new about the film's fish-out-of-water scenario, but he does it with such incredible charm and is so naturally sympathetic that he captures your empathy and makes you believe in this character."

The role made Freeman a global household name. Not bad for an actor who, as a youngster, wanted to be a professional squash player. He made the British national squad but fell out of love with the game and joined a theatre group in Teddington, Middlesex, inspired by Michael Caine's in the 1972 film Sleuth, which he used to watch every day.

The youngest of five, Freeman's parents split up when he was young and his father, a naval officer, died when he was 10. As a child he had asthma, fainting during performances – which his family initially mistook for part of his act.

After training at Central School of Speech and Drama in London, he made cameo appearances in Casualty, The Bill and Amy Jenkins's This Life – "I mainly got cast as little toerags" – and was in Channel 4's brutal gang rape drama, Men Only. Everything changed with The Office, leading to big-screen outings in Richard Curtis's Love, Actually and with Sacha Baron Cohen in Ali G Indahouse.

"I see very little of his performance from The Office in Sherlock," says Sue Vertue, the producer of Sherlock, which is made by Hartswood Films. "He is just the most incredible actor. Sometimes he will say, you know this line here, I think I can do that with a look. The writers, knowing what acting chops both these boys have, have given them lines they know they are going to have fun with."

Fiercely protective of his private life, Freeman once said he was "pathological about privacy … There are about 20 people in my life that I want to love me, and none of them are the Daily Mail."

He lives in Hertfordshire with his partner, the actor Amanda Abbington, whom he met 13 years ago on the set of Men Only. The pair, who have two children, appeared in several productions together and will do so again in the next series of Sherlock, with Abbington playing Watson's love interest. A self-described "mod with a small m" and a "huge soul boy", Freeman is a vinyl junkie, presenting his own show on Radio 6 Music and a Culture Show special on BBC2 celebrating 50 years of Motown. Preferring to listen to a record than see someone play live, he once declared: "My idea of a good night out is staying in."

With the third instalment of The Hobbit, There and Back Again, already in the can (Cumberbatch, by coincidence, voices Smaug the dragon) Freeman is next off to the US, where he will star alongside Billy Bob Thornton in the TV version of the Coen brothers' Fargo for the cable channel FX. He will play Lester Nygaard, the henpecked insurance salesman portrayed by William H Macy in the 1996 film.

"He will only do things that he thinks are great," says Moffat. "He is incredibly serious about acting, concentrating fiercely to the point where he can give himself a bad day. He can be a borderline grump if he feels he is having trouble, grumpy in the way that someone doing difficult sums is grumpy.

"He would turn down a major movie if it was really going to screw up his homelife. What he really wants is to go home and be with his kids and wife, and sometimes that's a rare quality to find in a film star."

Potted profile

Born 8 September 1971 in Aldershot, Hampshire.

Education Attended Salesian School, a Catholic comprehensive in Surrey, and later studied at the Central School of Speech and Drama, London.

Career Big break came as Tim Canterbury, in The Office, later starring in Sherlock. Films have included Anthony Minghella's Breaking and Entering, Jake Paltrow's The Good Night, an appearance as Rembrandt in Peter Greenaway's Nightwatching and with Simon Pegg in The World's End and as Bilbo Baggins in The Hobbit

High Winning a Bafta TV award for best supporting actor for his role as John Watson in Sherlock.

Low Having (initially) to turn down the Baggins role because of his Sherlock commitments. "I didn't want to miss that boat. It was awful"

What he says "I'm not particularly affable in real life, I have to tell you ... I have played nasty people"

What they say "If you were planning a remake of North by Northwest, he'd be your man." Jon Plowman, former head of BBC comedy