Ukraine's president Volodymyr Zelenskiy took time out from organising his country's fightback against Vladimir Putin's forces to sign a book of condolence for the Queen.
The UK's ambassador in Kyiv Melinda Simmons said she was "deeply honoured" by the president's gesture.
"Grateful to the president for taking the time to do this given all else that is happening in (Ukraine) at this time," she said.
Ukrainian troops have been taking part in a major counter-offensive against Russia's forces.
The message left by Zelenskiy read: "On behalf of the people of Ukraine and myself, I express sincere condolences over the death of Her Majesty Queen Elizabeth II.
"Ukrainian women and men share this great loss.
"We mourn with the United Kingdom, the Commonwealth of Nations and all subjects of the British Crown.
"The memory of Her Majesty and her selfless service to her people will forever remain in the history of mankind."