KIEV, Ukraine — As a television actor in Ukraine, Volodymyr Zelensky played an idealistic schoolteacher whose tirade against corruption is filmed by his students, winds up online and suddenly goes viral, propelling him to the presidency.

The show was a comedy. But the message of fighting back-room wheeling and dealing proved so popular that Mr. Zelensky started a political party named after the program, “Servant of the People,” and ended up becoming Ukraine’s president for real — with a life-mimics-art campaign that built his image as an anti-corruption crusader.

Now, Mr. Zelensky, a 41-year-old political novice who took office in May, is at the center of an impeachment debate in the United States over whether President Trump tried to pressure him into betraying the principles that catapulted him into office.

Mr. Trump and his personal lawyer, Rudolph W. Giuliani, have said publicly that former Vice President Joseph R. Biden Jr. should be investigated in connection with his son’s role in a Ukrainian energy company.