David Calhoun, Boeing’s current chairman, will take over as chief executive and president from 13 January.
Mr Muilenburg had faced calls for his resignation over the company’s response to two deadly crashes involving the firm’s best-selling 737 Max airliner.
The jet has been grounded since March.
Last week, Boeing said it would halt production of the plane while it waited for regulators to certify the jet’s safety.
“The board of directors decided that a change in leadership was necessary to restore confidence in the company moving forward as it works to repair relationships with regulators, customers, and all other stakeholders,” Boeing’s statement said.
Boeing added that Lawrence Kellner would become non-executive chairman with immediate effect.
“Under the company’s new leadership, Boeing will operate with a renewed commitment to full transparency, including effective and proactive communication with the FAA [Federal Aviation Authority], other global regulators and its customers.”
Air safety officials investigating the tragedies have identified an automated control system in the plane, known as MCAS, as a factor in the 737 Max crashes in Indonesia and Ethiopia, which killed 346 people.
Boeing has said the software system, which relied on a single sensor, received erroneous data, which led it to override pilot commands and push the aircraft downwards.
It has said it is fixing the software and has overhauled its review procedures. But US lawmakers, who are investigating the company, have said the firm was aware before the crashes that the system could be unreliable. They have accused the company of prioritising profit over safety as it pushed to get the planes to customers.
Boeing’s entire fleet of 737 Max planes has been grounded worldwide since March. The company had been hoping to have the planes back in the air by the end of this year, but US regulators made it clear that they would not be certified to return to the skies that quickly.
Boeing’s reputation took another hit last week when its Starliner spacecraft suffered technical problems that prevented it from taking the right path to the International Space Station.
Michael Stumo, who lost his daughter Samya Rose on the Ethiopia flight and has organised victims’ families against Boeing, called the resignation a “good first step toward restoring Boeing to a company that focuses on safety and innovation”.
“The next step is for several board members who are underperforming or unqualified to resign,” he said.
Mr Muilenburg first joined Boeing in 1985. He led the company’s defence, space and security division prior to his appointment as chief executive in 2015.
He was stripped of his role as chairman of Boeing’s board of directors in October and later agreed to give up his bonus. However, Boeing had continued to express confidence in him.
Congressman Peter DeFazio, who leads a committee investigating Boeing, told the New York Times this weekend that the firm’s decision to retain Mr Muilenburg suggested it was not “truly serious” about safety.
“If it was my call to make, Muilenburg would’ve been fired long ago,” he said.