The chairman of Disney studios described the jokes as "indefensible and inconsistent with our studio’s values"
The director of the two Guardians of the Galaxy films, James Gunn, has been fired from the upcoming sequel after old tweets resurfaced.
It comes after US conservative commentators highlighted a series of provocative jokes tweeted by the filmmaker several years ago.
Alan Horn, chair of Walt Disney Studios, said in a statement to US media: “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."
Mr Gunn had previously commented on the old jokes, tweeting: "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.
"As I have discussed publicly many times, as I’ve developed as a person, so has my work and my humor.
He added: "I used to make a lot of offensive jokes. I don’t anymore. I don’t blame my past self for this, but I like myself more and feel like a more full human being and creator today. Love you to you all."
4. For the record, when I made these shocking jokes, I wasn’t living them out. I know this is a weird statement to make, and seems obvious, but, still, here I am, saying it.— James Gunn (@JamesGunn) July 20, 2018
The director had been working on the script for Guardians Vol 3, which is due for release in 2020.
Before moving to Marvel films, Gunn was known for writing and later directing pitch-black comedies such as Slither and Super.
The firing came mere hours before Mr Gunn was due to appear on a panel at this week's Comic-Con event in the US.