In recent years the sleuthing of Sherlock Holmes has been depicted as ass-kicking and wisecracking in Guy Ritchie's movies, and as drily witty and cerebrally thrilling in the BBC TV series starring Benedict Cumberbatch. But now a new, quieter side to Arthur Conan Doyle's detective is set to reach the screen: his old age, after he retired to keep bees.

Ian McKellen is set to play Holmes in A Slight Trick of the Mind, adapted from the 2005 novel by Mitch Cullin which imagines Holmes's twilight years, alluded to in Doyle's novels. The film will depict him working on his final case aged 63, and also retired in Sussex aged 91, mentally frail and obsessed with the unsolved crime. Laura Linney will play his housekeeper, Mrs Munro, whose son Holmes has a fatherly attachment to.

The film will be directed by Bill Condon, who has worked on acclaimed films with each of the actors before: the Oscar-winning Gods and Monsters with McKellen, and his Alfred Kinsey biopic with Linney. "It's a really great mystery about who Sherlock Holmes is, but it's also a lovely, delicate movie about what happens as you get older," Condon told Entertainment Weekly. "I'm looking forward to the combined talent, skills, and smarts [of Linney and McKellen]. Both of them are incredibly detail-oriented and do an amazing amount of work before they get to set, and then they dive off the board and become their characters."

Linney, who recently gave birth to her first child, is something of a self-confessed Sherlock nerd: "I was obsessed with Sherlock Holmes as a young kid. You know how some people are into Dungeons & Dragons? I was into Sherlock Holmes. I loved the atmosphere of the stories. I loved the intrigue, his personality."

The BBC TV series meanwhile may not return for some time, due to the difficulty of filming three feature-length episodes around the filming schedules of its cast. Mark Gatiss, who co-created the series with Steven Moffat, told a fan Q&A in Brazil this week that it would be at least two years before new episodes are aired.

Jude Law, who stars in the Ritchie movies, said last year of a possible third film: "I think [Warner Bros.] wants it, and there's a lot of want from us as a team. We want it to be better than the other two. We want to make sure it's smarter and cleverer, but in the same realm."