In "Stranger Than Fiction," Ferrell stars as Harold Crick, a lonely, obsessive-compulsive tax auditor who one day finds he can hear an unseen, omniscient narrator describing his life — and imminent death.
Thompson co-stars as an author struggling to finish her novel about a social misfit taxman named Harold Crick, unaware he actually exists and that the dark fate she has in store for him will come true if she keeps writing.
On the set, Ferrell was fitted with an earpiece so he could hear British actress Thompson's elegant recorded narration in his head, a voice that drives Harold to distraction.
"It was great to literally use this voice in my head to play off of and not to have to imagine it or have what's typically done, which is have a script supervisor off camera reading it," Ferrell, 39, told The Associated Press at the Toronto International Film Festival, where "Stranger Than Fiction" premiered.
"The physical intimacy of having it inside my head really felt like, OK, this would make you crazy. ... And there's something about, well, her accent. Emma Thompson's not a bad choice. I'm just glad it wasn't Rhea Perlman."
After such broad comedy hits as "Talladega Nights: The Ballad of Ricky Bobby" and "Anchorman: The Legend of Ron Burgundy," Ferrell shows great restraint and dramatic pathos in "Stranger Than Fiction," which hits theaters in November.
The cast also includes Dustin Hoffman as a literature professor who offers Harold advice, Queen Latifah as the novelist's assistant and Maggie Gyllenhaal as a baker whose tax audit brings romance to Harold's life.
The film calls for a far subtler comic performance than anything Ferrell has done so far as Harold goes awkwardly about his business, unnoticed by the world.
"What's so touching about him in this is you imagine an actor really trying to be ordinary and nice, and I think Will is that person," Thompson said. "He really does have a kind of very innocent, very unknowing, almost unsophisticated quality colored with this incredible grasp of the ridiculous, which of course is the ultimate sophistication. So it makes him very watchable."
Former "Saturday Night Live" star Ferrell previously had shown off more serious acting chops in two movies last year, Woody Allen's "Melinda and Melinda" and the drama "Winter Passing."
"Stranger Than Fiction" director Marc Forster said Ferrell's depth and range have always been apparent in his characters.
"I think even in his broad stuff, he's always very believable," said Forster ("Finding Neverland"). "Even when it's so out there, he brings it back to the point where you follow the character and care about him."
After "Stranger Than Fiction," Ferrell heads back to big comedy with "Blades of Glory," in which he and "Napoleon Dynamite" star Jon Heder play disgraced ice-skating rivals who stage a comeback as the first men's pairs team.
Ferrell also hopes to reunite with "Talladega Nights" co-star John C. Reilly for "Step Brothers," about two men at odds when their parents marry.
"Kind of `The Parent Trap' meets `Ordinary People' is what we're gunning for," Ferrell said.
While Ferrell has become one of Hollywood's leading comic stars, he acts genuinely surprised that he got to work opposite Thompson, Hoffman and the other cast members.
"I felt like I was mistakenly put on an all-star team and everyone's fouled out and they're like `Ferrell, you're in. Just don't throw the ball out of bounds,"' Ferrell said. "OK, I'll play good defense, I'll only take a shot if I'm wide open. I just trusted in Marc and my fellow actors and tried not to mess it up."