KIEV, Ukraine — Before he decided to run for the presidency of Ukraine, Volodymyr Zelensky played a president in a television series called “Servant of the People,” about a schoolteacher whose speech about corruption goes viral on YouTube and propels him to office.
If opinion polls in Ukraine are even close to accurate, Mr. Zelensky, a comedian and actor, has a strong chance of winning this month’s election.
A survey released this month by a Ukrainian polling agency, Rating, showed Mr. Zelensky in the lead with support from 25 percent of the voters, followed by the deeply unpopular incumbent, Petro O. Poroshenko, with 17 percent, and a former prime minister, Yulia V. Tymoshenko, whose star has fallen in recent years, with 16 percent.
Mr. Zelensky attributes his improbable ascent to pent-up demand for a fresh face in Ukrainian politics, which remain mired in scandals and corruption five years after a revolution in the name of democracy and transparency deposed the country’s corrupt, pro-Russian president, Viktor F. Yanukovych.
“Humor has always been a sign of intelligence,” Mr. Zelensky told a group of foreign journalists in a recent interview.
Much is riding on the outcome in Ukraine, the front line in the West’s broader clash with Russia. If Mr. Poroshenko is unseated, a new leader in the capital, Kiev, could revive stalled negotiations to end Europe’s only current war, in which more than 13,000 people have died since Russian-backed forces seized control of eastern Ukraine in 2014.
Mr. Poroshenko has been at loggerheads with nationalist parties in Parliament over a 2015 peace accord, which they abhor. Perhaps more important, the departure of the post-revolution leadership, which Russia has accused of coming to power on the back of a coup, could offer a face-saving means for Moscow to find a way out of the conflict with Ukraine — and relief from some Western economic sanctions.
A free election and a possible democratic transition of power in Ukraine would also underscore the country’s credentials for closer trade and political integration with the European Union, a goal of the protesters who took to the streets in 2014 to oppose Russian-style authoritarianism.
Mr. Zelensky’s critics are not buying into his rags-to-riches tale, however, saying his success is indicative of the entrenched power of wealthy business interests in Ukraine.
His shows were broadcast on the television channel of Ihor V. Kolomoisky, the oligarch he lightly ribbed in a joke about a wealthy man seeking a lost bank called Privat, which sounds like privates. (“Why did the oligarch walk into the strip bar?”)
Mr. Kolomoisky is embroiled in a sprawling banking bailout scandal involving PrivatBank that cost Ukraine $5.6 billion — a staggering expense for a country whose government is propped up by loans from the International Monetary Fund.
Through the television studio, Mr. Zelensky has also been a business partner with the oligarch. Maintaining political clout in Ukraine could help Mr. Kolomoisky, who has moved to Israel, resolve the dispute in his favor. Mr. Zelensky is now positioned at least as the kingmaker in the two-stage election, and even the possible victor.
He has denied that he is a puppet for the scandal-hit mogul and has defended his qualifications as a comedian to lead a country involved both in a shooting war and the broader conflict between the West and Russia.
The contest pitting a comedian telling scatological jokes against two decades-long insiders falls short of the stirring vision of a fresh start that many Ukrainians shared in February 2014, when tens of thousands of protesters swept a corrupt, Russian-aligned government from power.
Yet the mere fact that the country is staging a contested election is something of a victory in the former Soviet Union. Elections in neighboring Russia, in contrast, have become little more than listless endorsements of the ruling party.
“The key point is, it’s democracy in Ukraine,” said John E. Herbst, a former United States ambassador in Kiev. “The election is unpredictable. There could be surprises. Ukraine has become a democracy, and this is progress.”
Ms. Tymoshenko, a former prime minister, is making her third run for president. The former, Russia-aligned government had prosecuted and imprisoned her in 2011, and Mr. Yanukovych’s political consultant, Paul Manafort, orchestrated a yearslong and costly smear campaign against her.
Ms. Tymoshenko was not released until 2014, after the second street uprising known as the “Maidan Revolution” drove Mr. Yanukovych into exile in Russia.
In this election, too, she has been the target of underhanded campaigning that she blames on the sitting president. Among the dozens of long-shot candidates running in the first round against her is a former construction worker named Yuri V. Tymoshenko, whose name, Ms. Tymoshenko says, is no coincidence.
She asserts he is on the ballot just to confuse voters in the polling booths. The tactic, common in Ukrainian politics, is known as running a clone.
Mr. Poroshenko has been highlighting his role as commander in chief of the military and the leader who won independence for the Ukrainian Orthodox Church, which had been subordinate to Moscow. In January, he toured the country with a scroll issued by the Orthodox Church authorities in Istanbul announcing independence for the Ukrainian church, called the Tomos of Autocephaly.
Asked by a man in the audience at one stop in a provincial church, “When are you going to fight corruption?” Mr. Poroshenko responded, “The Lord will soothe you.”
Mr. Zelensky is all but openly running on the record of his fictional television character, the schoolteacher turned president.
He filmed the latest season during the campaign, and it is scheduled to be broadcast before the election. Billboards have gone up in Kiev saying, “The President is the Servant of the People,” referring to the name of the comedy show and promoting the candidate at the same time.
In past seasons, Mr. Zelensky as the fictional president has boldly confronted Ukraine’s oligarchic class, calling out corrupt officials and in one scene using a vulgar term to tell the head of the I.M.F. to stop dictating economic policies to Ukraine.
In reality, the I.M.F. for a time halted disbursements to Ukraine in the wake of the PrivatBank scandal. Through the I.M.F. and bilateral aid, taxpayer money from Americans, Europeans and other donors to the Western-backed government had effectively vanished into the bank bailout, rather than helping with hospitals, schools or the army that is fighting Russian-backed separatists.
In the interview, Mr. Zelensky said the money should be returned if courts rule against Mr. Kolomoisky, but suggested his administration would leave it to the legal authorities.
“The state should help, but the state should not press” the courts, he said.
But Mr. Zelensky has said he will not reverse the nationalization of PrivatBank. In the joke, the oligarch leaves the strip bar disappointed because he saw no “Privat.”