The announcement by Mainz came two days after El Ghazi disputed the club's version of events when it lifted an earlier suspension. German news agency dpa reported Friday that prosecutors in the city of Koblenz were also investigating.
Mainz originally suspended El Ghazi on Oct. 17, saying he had posted and then deleted a message about the war that the club deemed "unacceptable."
On Monday, the club said his suspension was lifted and that he would receive a reprimand. Mainz said that followed talks with the management and that El Ghazi "regrets publishing the post and also was remorseful about its negative impact." The club added that the player "also stated that he does not question Israel's right to exist."
However, in a further social media post on Wednesday, El Ghazi indicated that the club had issued its statement without his permission.
"I do not regret or have any remorse for my position," the player wrote. "I do not distance myself from what I said and I stand, today and always until my last breath, for humanity and the oppressed."
The 28-year-old El Ghazi, who previously played for PSV Eindhoven, Aston Villa and Everton, joined Mainz as a free agent in September. He made three appearances as a substitute for the team, which is last in the Bundesliga.
In response to Mainz saying that his contract was terminated Friday, El Ghazi posted: "The loss of my livelihood is nothing when compared to the hell being unleashed on the innocent and vulnerable in Gaza."