Head coach Todd Haley will take over as offensive coordinator. Haley said Gailey would be offered another job within the organization.
Haley said that making himself offensive coordinator while still finding his way as a head coach was the most difficult decision he's faced. He was offensive coordinator the past two years at Arizona.
"I think the world of Chan as a coach, have the greatest amount of respect for him as a coach, as a person," said Haley. "But ultimately, the fate of this team, the accountability, falls to me."
The Chiefs are 0-3 in the preseason and have scored only two offensive touchdowns. The injury to Cassel on Saturday raises even more questions about how ready the Chiefs -- who were 2-14 last year -- will be for their season opener.
"After going through three preseason games and a lot of OTAs and a lot of practices in training camp, it became more apparent to me that I had to be more involved," Haley said.
He also will serve as quarterbacks coach.
In a statement released by the team, Gailey said he respected Haley's decision.
"There's never great timing for situations like this. However, Todd has to do what's best for the team and for the future of the Chiefs. I respect that. It didn't work out for us, but I certainly think that he has a very fine offensive mind and I feel very fortunate to have worked for the Chiefs these past two years.
"I look forward to seeing how I might be able to help the franchise in the near future in other areas."
A clash between Haley and Gailey seemed inevitable to running back Larry Johnson.
"It's like my mother says -- too many roosters in the henhouse, so to speak," he said. "Two coordinators and both passionate about what they do and passionate about how they want to call plays."
Gailey's firing comes less than two weeks before Kansas City's Sept. 13 regular-season opener at Baltimore.
Gailey was the Chiefs' offensive coordinator last season under former coach Herm Edwards. Haley was the offensive coordinator for the Cardinals during their run to the Super Bowl last season before being hired to replace Edwards.
Information from ESPN.com's John Clayton and The Associated Press was used in this report.