The deal was signed at a ceremony attended by negotiators, the President's national security adviser, and representatives of the Hezb-i-Islami faction of Gulbuddin Hekmatyar.
Afghan and US officials applauded the agreement, but a prominent human rights organization strongly criticized the deal.
In a statement, the US Embassy called Thursday's accord "a step in bringing the conflict in Afghanistan to a peaceful end."
That sentiment was echoed by Afghanistan's chief executive -- who is in a shaky power-sharing agreement with the country's President.
"As we sign peace agreement with Hezb-e-Islami, we invite #Taliban to pick peace over violence and secure a better future for themselves," Dr. Abdullah Abdullah said on his official Twitter account.
Hekmatyar developed a ruthless reputation during more than three decades of virtually uninterrupted conflict in Afghanistan.
In the 1980s, he received some $600 million in US aid, as Washington armed Afghan mujaheddin fighters battling the Soviet occupation.
During the subsequent civil war between rival mujaheddin commanders in the 1990s, Hekmatyar was accused of committing atrocities against civilians during the deadly struggle for control of the Afghan capital.
Some residents nicknamed the warlord "Rocketyar" because of his faction's frequent rocket strikes on the city.
"I have personally witnessed days when hundreds of rockets from Hekmatyar landed in civilian areas," said Najib Sharifi, an Afghan political analyst who was a child in Kabul during civil war in the 1990s.
"I myself witnessed friends who died from the rockets of Hekmatyar."
In a statement, Human Rights Watch criticized the peace agreement, arguing the deal would compound a "culture of impunity" by not prosecuting warlords accused of human rights abuses.
From ally to terrorist
After the US helped overthrow the Taliban in 2001, Hekmatyar fought against the US military and the Western-backed Afghan government.
His followers claimed responsibility for several deadly bombing attacks against US troops. In 2003, the US added Hekmatyar to its growing list of formally designated terrorists.
As the peace deal was being signed on Thursday, around 100 demonstrators protested in a park in Kabul, chanting "we don't want a peace deal with a murderer."
A political analyst here described the deal as a double-edged sword.
"On the one hand, it's good because an insurgent group has basically agreed to lay down arms," said Sharifi, who is also director of the Afghan Journalists' Safety Committee.
"But on the other hand, there are worries Hekmatyar would be used for political purposes by the government, and this could further escalate ethnic tensions and factional rivalries."