The foreign ministry said the move was necessary because of the deteriorating security situation.
The ambassador and four other diplomatic staff had left Ukraine with the support of a team of special forces from the Swiss army.
The ministry on Wednesday confirmed reports by several Swiss newspapers and online sites.
The embassy was closed on Monday. It had operated with reduced personnel and resources over the past week.
The foreign ministryExternal link has advised all Swiss citizens to leave Ukraine if possible. Swiss nationals who need assistance are told to contact the foreign ministry helpline by e-mail or telephone.
There were 268 registered Swiss nationals and family members in Ukraine until last Thursday.
However, it is not clear how many of them have already fled the country in the meantime.
More
More
Switzerland backs full EU sanctions against Russia
This content was published on
Switzerland has decided to adopt the full range of sanctions imposed by the European Union against Russia.
More people switching to generic medicine in Switzerland
This content was published on
Measures to encourage more people in Switzerland to use generic medicine in place of brand name originals appear to be working.
Nature magazine: scientific breakthroughs in medicine and space travel in 2025
This content was published on
The science magazine Nature expects breakthroughs in mind-reading machines, new weight-loss drugs, and particle physics in 2025.
This content was published on
Swiss minister Karin Keller-Sutter wants to use Platform X to communicate with the population during her term as president in 2025.
Swiss Post delivers record number of parcels in pre-Christmas period
This content was published on
Swiss Post delivered a total of 22.3 million parcels between the Black Friday promotional week at the end of November and Christmas.
SWISS plane in Graz: employee still in intensive care
This content was published on
The cabin crew member of the SWISS Airbus A220 which made an emergency landing in Graz, Austria, on Monday is still in intensive care.
This content was published on
The Swiss government has advised its citizens against travelling to Ukraine, but it stopped short of asking them to leave the country.
You can find an overview of ongoing debates with our journalists here . Please join us!
If you want to start a conversation about a topic raised in this article or want to report factual errors, email us at english@swissinfo.ch.