In the wake of the deadly attack on Israel by Hamas gunmen, Mazraoui had put up several pro-Palestinian posts, including one that called for "victory" for "our oppressed brothers in Palestine”.
The messages, which have since been deleted, were posted after Hamas militants stormed into Israel from the Gaza Strip on October 7, and killed at least 1,400 people, mostly civilians who were shot, mutilated or burnt to death on the first day of the raid, according to Israeli officials.
Israel says around 1,500 Hamas fighters were killed in clashes before its army regained control of the area under attack.
More than 3,700 Palestinians, mainly civilians, have been killed across the Gaza Strip in relentless Israeli bombardments in retaliation for the attacks by the Palestinian Islamist militant group, according to the latest toll from the Hamas health ministry in Gaza.
Bayern said they held a "detailed and clarifying conversation" with the player due to his "Instagram posts in connection with the terror against Israel almost two weeks ago which led to irritation and criticism”.
But the club's chief executive Jan-Christian Dreesen said Mazraoui "credibly assured us he rejects terror and war" and "regrets if his posts caused irritation”.
In the statement issued by Bayern, the Morocco player was quoted saying: "I condemn every kind of terrorism and every terrorist organisation.”
Bayern coach Thomas Tuchel said on Friday: "I'm very happy with the club's statement, I back it 100 percent -- also personally.
"The topic is much bigger than sport.”
In addition to the conversations with Mazraoui, Tuchel revealed discussions with goalkeeper Daniel Peretz, who is Israeli, saying "it's absolutely our duty to talk to him and see how he's doing.”
Tuchel said he was confident that there are no rifts among his players.
"The locker room is away from religious and cultural differences, it is always a place where you can peacefully work towards a common goal," he said.
Mazraoui will remain with the squad but is currently "out of action" due to an injury he sustained on international duty with Morocco, the club said.
Bayern's opponents on Saturday, Mainz on Tuesday suspended player Anwar El Ghazi indefinitely for "unacceptable" social media posts on the conflict.
On Thursday, Mainz coach Bo Svensson said the decision was "correct" despite being "not optimal from a sporting perspective".