The 33-year-old Scottish actor was billed to star alongside Benedict Cumberbatch, who has been cast as Wikileaks founder Julian Assange in the film.
But filming commitment on the next X-Men project, "Days of Future Past", has forced McAvoy to walk away from the film, the Hollywood Reporter said.
McAvoy's role has already been filled by "Inglourious Basterds" star Daniel Bruhl. Bruhl will now portray Daniel Domscheit-Berg, the author of the book Inside WikiLeaks: My Time with Julian Assange at the World's Most Dangerous Website. Meanwhile, Laura Linney is reportedly in talks to join the cast.
Photos: Huma Qureshi, Neha Dhupia and other celebs at MAMI
Flashback: When sexy models sizzled in bikinis at Tokyo fashion show
Photos: Amy Jackson, Daisy Shah at Mumbai airport
Photos: Sridevi, Irrfan and other celebs at 'Mughal-e-Azam' screening
Photos: WWE Diva Kelly Kelly sizzles in bikinis on Instagram