Mr Ghani won 56.44% of votes in the 14 June run-off, election officials said. His rival Abdullah Abdullah had 43.56%.
Mr Abdullah, who fell just short of an outright majority in the first round, rejected the result.
Both men have alleged fraud in the election. Votes are being re-checked at more than 7,000 polling stations.
They represent nearly a third of centres where votes were cast and correspondents say recounts could significantly alter the result.'Only initial results'
Chief election commissioner Ahmad Yusuf Nuristani stressed that the results were not final and acknowledged that there had been "some mistakes in the overall process".
"It is only initial results," he told a news conference in Kabul. "There is a chance of change in the overall figure.
"The announcement of preliminary results does not mean that the leading candidate is the winner.