President Ndayishimiye sacked his prime minister Alain Guillaume Bunyoni and his cabinet chief General Gabriel Nizigama on a day of high drama in the troubled central African country.
At a hastily called parliamentary session, lawmakers approved the appointment of security minister Gervais Ndirakobuca to replace Bunyoni as prime minister in a unanimous 113-0 vote, the national broadcaster RTNB said.
Bunyoni's departure came after Ndayishimiye, who has been in power for just over two years, last week warned of a coup plot against him.
"Do you think an army general can be threatened by saying they will make a coup? Who is that person? Whoever it is should come and, in the name of God, I will defeat him," Ndayishimiye had warned at a meeting of government officials on Friday.
The fate of Bunyoni, a senior figure in the CNDD-FDD party, the former rebel group that has ruled the impoverished country for years, was not immediately known.
Nizigama was replaced by Colonel Aloys Sindayihebura, who until now has been in charge of domestic intelligence within the National Intelligence Service.
Ndayishimiye took power in June 2020 after his predecessor Pierre Nkurunziza died of what the Burundian authorities said was heart failure.
His election in May 2020 had offered promise after the chaotic and bloody rule of his predecessor, although the country has failed to improve its dire record on human rights.