Joyce secured a majority in the 21-member party room at a meeting in Canberra on Monday after long-time supporter Matt Canavan moved a spill motion.
Nationals whip Damian Drum confirmed the outcome of the leadership but did not reveal the vote tally.
“He has to go through a process now to be sworn in, to have all the conversations, to talk to the prime minister, and effectively get on with the job of representing our people,” he told reporters at Parliament House.
Asked what the decision said about the junior coalition partner, Drum said: “The most democratic party in Australia”.
McCormack was asked during a brief press conference after the meeting what he told Nationals colleagues.
“I said thank you for the great privilege of serving you,” he told reporters.
Joyce will address the media this afternoon.
The change in Nationals leadership could have major implications for the Morrison government with the junior coalition partner set for a ministerial reshuffle.
Agriculture Minister David Littleproud has retained his role as Nationals deputy leader.
Scott Morrison will have to navigate a new dynamic, with Joyce widely regarded as a more combative force within the coalition than McCormack.
Before the spill, Morrison – who is in quarantine at The Lodge – threw his support behind the incumbent.
“I’ve got a wonderful partnership with Michael. We’ve worked very closely together and provided great stable leadership for Australia,” he told 2GB radio.
Joyce failed to topple McCormack at his last attempt in February last year but has prevailed at his second crack.
Joyce lost his job in 2018 after a major scandal stemming from his extra-marital affair with a staffer who has now given birth to the couple’s two children, as well as sexual harassment allegations he strongly denies.
Earlier, McCormack vowed not to stand aside.
“If I survive then the people who actually run against me, they should think long and hard about their futures,” he told reporters in Canberra.
“They should think long and hard about the role they need to play in government. They should stop being so destabilising.”
Local News Matters
Media diversity is under threat in Australia – nowhere more so than in South Australia. The state needs more than one voice to guide it forward and you can help with a donation of any size to InDaily. Your contribution goes directly to helping our journalists uncover the facts. Please click below to help InDaily continue to uncover the facts.