The leaders, who have been firm allies throughout the conflict waged by Russia on its neighbour, shared a call on Monday afternoon, the day before the the formal appointment of the new PM.
Mr Johnson thanked Mr Zelensky for his “leadership and friendship” and said it had been “a privilege to work with him and support him”.
The outgoing Prime Minister has made several visits to the Ukrainian capital, the most of recent of which was last month, when he set out a further £54 million package of military aid.
Mr Zelensky has often spoken warmly of his relationship with Mr Johnson, and heaped praise on his “true friend” and ally as the PM entered his final few days in office.
It's been a privilege to work with you @ZelenskyyUa, and I look forward to staying friends. The UK will continue to back Ukraine every step of the way, because we know that your security is our security, and your freedom is our freedom.
Slava Ukraini 🇺🇦 https://t.co/knjrR9sGDj
— Boris Johnson (@BorisJohnson) September 5, 2022
He said he was “very happy” when Mr Johnson survived a crunch confidence vote in June, and noted even after the PM’s downfall he did not want him to “disappear”.
“I want him to be somewhere in politics in a position to be someone,” he told Piers Morgan Uncensored on TalkTV.
Downing Street said Mr Johnson made it clear to Mr Zelensky that he believes the Ukrainian people “can and will win the war”.
“President Zelensky thanked the Prime Minister for believing in Ukraine and his people and updated on the recent progress of his armed forces in the south of the country,” the PM’s official spokesman said.
“The Prime Minister said he was convinced the Ukrainian forces could continue to succeed in pushing back Russian forces and added that the UK remains steadfast in its support.
“The Prime Minister told President Zelensky it had been a privilege to work with him and support him and the leaders agreed to stay in close touch as friends.”
The spokesman said the Prime Minister did not discuss his successor, Liz Truss, with the Ukrainian leader.
In a tweet following the announcement that Ms Truss had won the Tory leadership contest, Mr Zelensky described Mr Johnson as a “great friend” and thanked him for his “personal bravery”.
Had a summing up conversation with @BorisJohnson in his current capacity. On behalf of all 🇺🇦 people, I thanked him for his personal bravery, principles & a major contribution to countering RF's aggression. I look forward to cooperation with a great friend of 🇺🇦 in a new status.
— Володимир Зеленський (@ZelenskyyUa) September 5, 2022
Mr Johnson later tweeted that he looked forward to staying friends with Mr Zelensky, as he insisted that the UK would continue to back Ukraine “every step of the way”.
The No 10 spokesman was asked if it was important to Mr Johnson that his last phone call to a world leader as PM was with the Ukrainian president.
He responded: “I think it was very important to the Prime Minister that he was able to reiterate both his firm belief that a new government will be steadfast in its support for Ukraine and that he as an individual will continue to advocate for President Zelensky and the people of Ukraine even after he has left the office of Prime Minister.”