With half the ballots counted, Volodymyr Zelenskiy – who plays the president on TV – got about 30%, with current leader Petro Poroshenko on 16%.
The two – who have expressed largely pro-EU opinions – are set to take part in a run-off election next month.
Former prime minister Yulia Tymoshenko appears to have been eliminated.
"I'm very happy but this is not the final action," Mr Zelenskiy told the BBC's Jonah Fisher, minutes after exit polls were announced.
Mr Poroshenko described his second-place showing as a "harsh lesson".
Presidential election results
Leading candidate in each region. Latest as of 17:59, 1 April, Kiev time (BST +2). 88.91% of votes counted
The interior ministry says hundreds of electoral violations have been reported, but foreign observers say the vote appeared to be mainly smooth.
A total of 39 candidates were on the ballot paper. With none receiving more than 50%, the top two will go forward to the run-off on 21 April.
The Ukrainian president has significant powers over security, defence and foreign policy, in a system described as semi-presidential.
Who is Volodymyr Zelenskiy?
Mr Zelenskiy is aiming to turn his satirical TV show Servant of the People – in which he portrays an ordinary citizen who becomes president after fighting corruption – into reality.
He has torn up the rulebook for election campaigning, staging no rallies and giving few interviews. He appears to have no strong political views apart from a wish to be new and different.
His extensive use of social media appealed to younger voters.
Mr Zelenskiy's readiness to speak both Russian and Ukrainian, at a time when language rights are a hugely sensitive topic, gained him support in Ukraine's largely Russian-speaking east.
His Achilles heel, however, is his relationship with Ukraine's most controversial oligarch, Igor Kolomoisky, says our Kiev correspondent.
Mr Kolomoisky is the owner of TV channel 1+1 – which has given fulsome support to Me Zelenskiy.
The oligarch, who lives in self-imposed exile, faces numerous investigations in Ukraine into his business dealings.
But Mr Zelenskiy has insisted he is "no puppet" of Mr Kolomoisky.