The move was an attempt to defuse a political crisis that had triggered rare protests in Kyiv.
Zelensky said Khmara's experience running long-range strikes on Russian territory made him well suited to lead the ministry, adding that this was where Ukraine's defence efforts should be focused.
"Yevhenii Khmara has gained extensive and, in many respects, unprecedented experience with technological combat operations. This is exactly where our defense efforts should be focused during this war," the Ukrainian president wrote on X.
Zelensky praised Khmara's record leading the SBU's "Alpha" unit, which has played a key role in those strikes, and said he would ask parliament to confirm the appointment permanently.
Khmara has led the SBU since January 2026, when he replaced Vasyl Malyuk.
Fedorov, speaking to reporters after his dismissal, accused armed forces commander-in-chief Oleksandr Syrskyi of blocking ministry initiatives, saying that instead of working out how to defeat Russia, the general had "figured out how to split the country."
Syrskyi hit back, pointing to his role defending Kyiv in 2022 and appearing to mock Fedorov's press conference.
A deputy commander of Ukraine's air force, Pavlo Yelizarov, resigned in response to Fedorov's sacking.
More than a thousand protesters gathered outside Zelensky's office chanting "Shame!", in scenes reminiscent of demonstrations in July last year that forced the president to reverse a move stripping anti-corruption agencies of their independence.
Fedorov, 35, is known for his anti-corruption stance and for modernising Ukraine's armed forces, particularly its drone capabilities.
Zelensky reportedly told MPs from his Servant of the People party on Wednesday that Fedorov's conflict with Syrskyi and other commanders had proved impossible to resolve.
Political analyst Yevhen Mahda told Poland's PAP news agency that Zelensky's real aim had been to remove Fedorov, and that although he achieved this, it triggered "at the very least a serious political crisis" rather than the effective wartime governance the reshuffle was meant to deliver.
The shake-up followed the resignation of Prime Minister Yulia Svyrydenko and the appointment of former Naftogaz chief Serhiy Koretsky as her successor.
Parliament approved the wider cabinet on Thursday, with 264 MPs in favour.
New appointments included Vsevolod Chentsov as deputy prime minister for European integration, while the post of deputy prime minister for reconstruction was scrapped.
Andriy Sybiha is expected to be reappointed foreign minister, though this has yet to be formally proposed.
(ał)
Source: PAP