The move was necessary "as (McAvoy) has left the production due to unrelated circumstances beyond his control," read a statement from Summit Entertaiment.
Maybe he needs to practice his weaving in preparation for the suddenly Jolie-less "Wanted 2."
The movie, formally titled "I'm With Cancer," is based on TV producer Will Reiser's script about his own battle with cancer in his 20s.
"It's incredibly unfortunate that circumstances outside of everyone's control have taken James away from the project, but, with James' blessing, we were able to have Joseph step in to take on the role of Adam," stated co-star and producer Seth Rogen. "We all look forward to working with James in the future."
"I feel extremely lucky that our film has found an exceptional actor to step into the role of Adam," added director James Levine ("The Wackness"). "I have admired Joseph's work since 'Brick,' and I am so excited to work with him."
Gordon-Levitt's outstanding performance as an anarchist stoner in "Hesher" wowed audiences at this year's Sundance, a sharp contrast to his role in "(500) Days of Summer."
Anna Kendrick, Bryce Dallas Howard, Anjelica Houston and Philip Baker Hall also star in the film, which begins shooting Monday in Vancouver.