The Hollywood legend was outraged after the screen beauty compared Michael Bay to Hitler during a press interview.
The 25 year old actress was quickly dumped from the film and replaced by British model Rosie Huntingdon-Whitley.
Fox had tried to claim she left the third in the series of the films to pursue other acting opportunities.
But ahead of the July 4th premiere of “Transformers 3” director Bay has revealed for the first time he was told to get rid of the actress.
He said: “You know the Hitler thing. Steven (Spielberg) said Fire her right now.”
Spielberg is producer of the film which stars Shia LaBeouf.
Fox had appeared in the first two Transformers films and the roles helped her be named one of the sexiest women in the world.
She had been cast in the third film but shortly before production began she gave an interview to the British magazine “Wonderland” in which she said Bay wants to be “like Hitler on his sets”.
Other crew members from the film hit back on a blog comparing Fox’s acting to that of a porn star.
In an open letter posted on Michael Bay’s website the crew member wrote: “Michael found this shy, inexperienced girl, plucked her out of total obscurity thus giving her the biggest shot of any young actresses’ life.
“He told everyone around to just trust him on his choice. He granted her the starring role in Transformers, a franchise that forever changed her life; she became one of the most googled and oogled women on earth. She was famous! She was the next Angelina Jolie, hooray! Wait a minute, two of us worked with Angelina – second thought – she’s no Angelina. You see, Angelia is a professional.
“We know this quite intimately because we’ve had the tedious experience of working with the dumb-as-a-rock Megan Fox on both Transformers movies.”
The film’s screenwriter Ehren Kruger told GQ magazine that Fox didn’t seem interested when she arrived for rehearsals for “Transformers: Dark of the Moon.”
He said: “She seemed like an actress who didn’t want to be part of it.”
LaBeouf told GQ: ” She started s— talking our captain. Which you can’t do.”
Bay said he wasn’t hurt by the Hitler comment.