"Guardians of the Galaxy" franchise director James Gunn has been axed from the third movie over a series of offensive messages posted on Twitter several years ago.
The tweets, mainly from 2008 and 2011, joked about taboo topics such as rape and pedophilia.
Disney, which owns the franchise as the parent company of Marvel Studios, sent AFP a statement confirming the studio was parting ways with one of its biggest stars.
"The offensive attitudes and statements discovered on James' Twitter feed are indefensible and inconsistent with our studio's values, and we have severed our business relationship with him," said Alan Horn, chairman of Walt Disney Studios.
Gunn has been an outspoken critic of President Donald Trump and has drawn the ire of conservative critics, who went back through his timeline and dug up the tweets.
Jack Posobiec of The Daily Caller and right-wing commentator Mike Cernovich are among those who unearthed the messages.
"Many people who have followed my career know when I started, I viewed myself as a provocateur, making movies and telling jokes that were outrageous and taboo," Gunn wrote on Twitter after the offensive tweets resurfaced late Thursday.
"As I have discussed publicly many times, as I've developed as a person, so has my work and my humor."
Gunn, who has deleted his account, described himself as a "very, very different" person than when he wrote the tweets, now focusing on love rather than anger.
"My days saying something just because it's shocking and trying to get a reaction are over," he added.
Gunn directed both "Guardians of the Galaxy" films, and was planning to head to San Diego's huge annual Comic-Con fan convention this week with a secret film project that he had teased on Instagram.
"Guardians of the Galaxy Vol. 3" is due out in 2020.