Ghani's poll rival Abdullah Abdullah has said he will reject the result of the ongoing vote count due to what he claimed was "blatant fraud" committed by Ghani, the election authorities and outgoing President Hamid Karzai.
"I ask Dr Abdullah as a national figure to respect the rule of law," Ghani told supporters in his first speech since the dispute over alleged fake votes erupted.
"We are all tired of the language of threats and unlawfulness... Our votes are clean, and we will defend each vote," he said.
Ghani, who travelled abroad for dental treatment after the June 14 election, returned to Kabul to deliver an uncompromising message to Abdullah, who has boycotted the Independent Election Commission (IEC).
"It is the people's right to elect their leader through votes. Some people have created a situation where they threaten that right," he said.
"Nobody can challenge the election process. My demand to Dr Abdullah is to return to the process."
The United Nations has also appealed for Abdullah to re-join the election process, which, if completed, will be Afghanistan's first democratic transfer of power.
The UN hosted talks between Abdullah and the IEC on Monday, but the outcome of the meeting was unclear.
Abdullah went into the second-round run-off election widely seen as the favourite to succeed President Hamid Karzai, who came to power after the Taliban regime was ousted by a US-led offensive in 2001.
But reports of the early vote count put Ghani well ahead - provoking outrage from Abdullah, and fuelling fears of instability if rival supporters take to the streets as NATO combat troops withdraw this year.
A successful election is seen as crucial by nations that have fought Afghanistan's insurgents since 2001 and donated billions in aid, in the hope of setting up a functioning state to replace the harsh Islamist rule of the Taliban.
Both rivals predict victory
Abdullah claims that there was massive ballot-box stuffing, especially in the Ghani heartlands of the southeast where he says there were more votes cast in some areas than eligible voters.
But a smooth election process still appears in doubt, with Abdullah and Ghani both determined not to concede defeat.
"Documents and evidence that we have show our votes were higher in all 34 provinces," Ghani said on Wednesday, upping the stakes in his stand-off with Abdullah.
Foreign diplomats have expressed alarm at the prospect of a disputed election as military assistance and civilian aid declines.
The challenges that await the next president have been underlined in recent days by a prolonged battle between Afghan security forces and Taliban militants in the southern province of Helmand.
More than 800 insurgents launched a major five-day offensive to take territory recently vacated by US troops.
Officials said that the Taliban had been beaten back, adding that 100 insurgents have been killed, along with at least 21 Afghan police and soldiers and 40 civilians.
The NATO mission said it had provided limited air support as well as intelligence, surveillance and reconnaissance help.
NATO's 50,000-strong combat force will leave Afghanistan by December, though the insurgency remains fierce.
About 10,000 US troops will stay into next year before all exit by the end of the 2016.
The preliminary election result is due on July 2 and the final result, after adjudication of complaints, is scheduled for July 22.
The run-off vote was held ten days ago after an eight-man first-round election, in which Abdullah won 45 percent against Ghani's 31.6 per cent.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.