Disney has removed James Gunn as director of Guardians of the Galaxy Vol. 3 after a number of offensive social media posts resurfaced online.
The American filmmaker apologized after old tweets in which he appeared to joke about paedophilia and rape were unearthed and widely shared.
But Walt Disney Studios Chairman Alan Horn announced his sacking on Friday. Gunn wrote and directed both of the first two Guardians of the Galaxy films, which starred the likes of Chris Pratt, Zoe Saldana and Bradley Cooper.
The first installment was one of Marvel’s most successful films, making more than $771m (£540m) at the worldwide box office.
Gunn has also worked on the hugely-successful Avengers franchise. There has been no immediate response from the filmmaker, but in a series of tweets posted on Thursday he addressed the controversy surrounding his old posts.
The now-deleted posts first came to light when conservative news website the Daily Caller unearthed them.
The director has been an outspoken critic of President Donald Trump. Earlier this month, he accused the US leader of “treason” over comments he made at a summit with his Russian counterpart Vladimir Putin.