The official results are expected to be announced over the next few days.
Duda, bidding for a second term in office, garnered 50.4 percent of the vote, according to exit poll results released seconds after voting ended at 9pm.
Opposition-backed challenger Rafał Trzaskowski, the mayor of Warsaw, won 49.6 percent, the Ipsos survey showed.
The polling company has said its exit poll results could vary by up to 2 percentage points from the final, official results.
“Long live Poland!” chanted a jubilant Duda as supporters around him erupted in cheers.
“I promise I won’t disappoint you,” he added, thanking his wife and daughter and the conservative government which backed him in the presidential race.
Duda said the election campaign had been “brutal,” but called on opponents to show each other respect amid Poland’s bitter political divisions. He invited his challenger to shake hands at the presidential palace late on Sunday evening.
Trzaskowski did not concede defeat but said he was waiting for the official results to come through.
“We said it would be close and it is close. But I’m absolutely convinced we will win,” he told supporters.
Turnout on Sunday was 68.9 percent, according to the exit poll.
The Polish president has the power to veto legislation passed by parliament, a key prerogative in a country where traditionalists and liberals are bitterly divided.
Opposition-backed challenger Rafał Trzaskowski. Photo: PAP/Radek Pietruszka
Ahead of the vote, conservatives had warned that if Trzaskowski, the candidate of the opposition Civic Platform party, was elected head of state, he would block a swathe of government initiatives, hampering the administration’s ability to push through core policies.
Poland’s governing conservatives last fall won parliamentary elections for a second consecutive term, and are hoping the official results of Sunday’s election will confirm they have kept their grip on power by maintaining control of the presidency.
In a first round of voting in the presidential ballot on June 28, no candidate won an outright majority, meaning a second round had to be held.
Duda won the most votes last month, garnering 43.5 percent. Trzaskowski was runner-up with 30.46 percent, according to the National Electoral Commission (PKW).
Source: Polish Radio/TVP