0609 GMT October 17, 2019
Announcing his candidacy, Hekmatyar pledged to restore peace and security and said the current government had failed to end the war with the Taliban, Reuters reported.
"Our country's situation requires a powerful central government led by an elected president supported by the majority of people," he told a news conference in Kabul.
In 2016, President Ghani's government granted immunity to Hekmatyar but the former warlord has been critical of his administration and the parliamentary election process in 2018.
The decision to contest the presidential polls in July is seen by analysts as the ex-warlord's attempt to legitimize his party.
Hekmatyar’s faction has been blamed for atrocities committed during Afghanistan's brutal civil war in the 1990s.
The July election faces serious security challenges with the Taliban threatening large parts of the country. The polls will be a crucial test for election officials who were criticized for failing to conduct free and fair parliamentary elections last October. The 2014 presidential election won by Ghani was also tainted by accusations of widespread cheating.
Afghanistan's presidential race is now in full swing, with several former officials, politicians lining up to challenge Ghani who is expected to register his candidacy for a second term on Sunday.
On Saturday Interior Minister Amrullah Saleh resigned to run for vice-presidency as part of Ghani's team, according to two political sources.
In December, Ghani appointed Saleh, a former security official and an uncompromising opponent of the Taliban, to his government in a bid to secure the support of former opponents for a second term.