Hekmatyar, who heads the now largely dormant Hezb-i-Islami militant group, is the latest in in a series of controversial figures that Kabul has sought to reintegrate in the post- Taliban era.
The deal with Afghanistan's second-biggest militant group marks a symbolic victory for President Ashraf Ghani, who has struggled to revive peace talks with the more powerful Taliban.
The government said an "initial draft agreement" would be signed on Thursday by Hekmatyar's delegation and Afghanistan's High Peace Council (HPC), responsible for reconciliation efforts with militants.
"This peace agreement will be implemented after it is formally signed by President Ashraf Ghani and Gulbuddin Hekmatyar," it added, without specifying a date.
More From This Section
Hekmatyar was a prominent anti-Soviet commander in the 1980s and stands accused of killing thousands of people in Kabul during the 1992-1996 civil war.
He is widely believed to be living in hiding in Pakistan, but his group claims he remains in Afghanistan.
"(Hekmatyar's) return will compound the culture of impunity that the Afghan government and its foreign donors have fostered by not pursuing accountability for the many victims of forces commanded by Hekmatyar and other warlords that laid waste to much of the country in the 1990s," Human Rights Watch said last month.
According to an initial draft agreement seen by AFP, the government will offer Hekmatyar legal immunity in "all past political and military proceedings" as well as release Hezb-i -Islami prisoners.
Hekmatyar is designated a "global terrorist" by the US and is blacklisted by the UN. The Afghan government will likely work towards lifting those restrictions in order to reintegrate him into local politics.
Hezb-i-Islami has been largely inactive in recent years, with its last big attack in Afghanistan in 2013. That killed 15 people including five Americans.
The US State Department had earlier said Washington was not involved in the talks but welcomed the potential truce with Hekmatyar.
The Taliban, who were toppled from power in 2001, have refused to engage in talks with the Western-backed Afghan government as they ramp up their nationwide offensive against it.