The secret's out: James McAvoy in the frame to play Bond creator Ian Fleming

In his rise to the Hollywood A-list, James McAvoy has already donned a tuxedo, dabbled in intrigue and played a tortured author. They are all on-screen experiences which will stand him in good stead if his latest rumoured leading role comes to fruition – a biopic of the James Bond creator, Ian Fleming.

The 30-year-old Scottish actor is reported to have been approached by the producers of the $40m (£25m) film about the life of the hard-living journalist and author who eventually settled in his Jamaican estate, Goldeneye, to write his 12 thrillers about 007 following a distinguished wartime career in British intelligence.

McAvoy, who received a Golden Globe nomination for his previous venture into period drama in the film version of the Ian McEwan novel Atonement, is the second Hollywood star to be linked to a role playing Fleming, whose playboy lifestyle was combined with a cloak-and-dagger existence as the planner of some of Britain's most daring commando operations during the Second World War.

Leonardo DiCaprio and his production company announced plans in 2008 for a film about Eton-educated Fleming's genesis from a member of the intelligence community to one of history's biggest selling authors. More than 100 million copies of the James Bond novels and nine short stories have been sold worldwide.

A source yesterday denied that McAvoy was formally "attached" to the Fleming project but it is understood a formal approach has been made to secure his involvement.

The film, which is based on an acclaimed biography of Fleming written by Andrew Lycett and is being developed by independent production company PalmStar, will focus on the years that gave Fleming the inspiration for his most famous creation as he drifted through stints as a journalist and a stockbroker in the 1930s before being recruited to the Naval Intelligence Division at the outbreak of the Second World War.

Fleming's wartime experiences were later recycled into the Bond novels, which he started writing in 1952 partly as a way of escaping the stress of his forthcoming marriage to Anne O'Neill.

Rear Admiral John Godfrey, who recruited him, served as the inspiration for "M", while a particularly dashing naval officer, Patrick Dalzel-Job, who worked under Fleming in a clandestine commando unit, is widely held to have been "the real James Bond".

Film industry insiders said McAvoy would be well suited to the role of the debonair author after previous roles as a playboy in Bright Young Things, a doubt-racked author in a biopic of Leo Tolstoy, and a financially challenged entrant into the English upper-middle class in Atonement.