KABUL, Afghanistan — When President Ashraf Ghani stood up last week to try to lure the Taliban to peace talks, promising them amnesty and political inclusion, he could point to a recent example: the deal that brought the militant group Hezb-i-Islami and its deeply divisive leader, Gulbuddin Hekmatyar, in from the battlefield.

Through decades of Afghan turmoil, Mr. Hekmatyar has managed to keep himself near the action, and has broken alliances several times to do it. He has been a C.I.A.-favored fighter of the Soviets, a warlord who mauled Kabul, a prime minister, an admirer of Al Qaeda, an ally and enemy of the Taliban, and an unabashed proponent of suicide bombings against American forces.

Since the deal that allowed him to return, initiated during the Obama administration and finalized last year under the Trump administration, he has become a more public player in the increasingly chaotic and hostile jumble of Afghan politics.

Though his reconciliation has been held out as a hope for peace, one thing Mr. Hekmatyar has not yet become is any kind of political peacemaker.