Spokeswoman Iuliia Mendel said Zelensky received the diagnosis earlier this week.
Officials said doctors admitted Zelensky and his chief of staff Andriy Yermak, who also tested positive for the coronavirus.
Mendel said both men have displayed mild symptoms so far.
Zelensky and Yermak aren't the only Ukrainian officials who have been sickened by the virus.
Ukrainian Parliament Speaker Dmytro Razumkov has also said he tested positive.
"I've got a positive test result. I feel fine, I hope it will continue to be so," he wrote in a Facebook post.
"I will be self-isolating and working remotely. Observe quarantine restrictions and take care of yourself and your loved ones. I sincerely wish you all good health."
Zelensky became a widely known figure last year during the impeachment proceedings against U.S. President Donald Trump. A congressional investigation scrutinized a phone call between the two leaders in July 2019, during which Trump had asked Zelensky to publicly announce Ukraine was investigating Democratic presidential candidate Joe Biden.
Trump was accused of withholding military aid to Ukraine in exchange for the political favor. Zelensky didn't announce any investigation of Biden, who is now president-elect of the United States, related to his son Hunter's time with a Ukrainian gas company.