The inmates are included in the 5,000 prisoners listed by the Taliban group.
The palace tweeted that Ghani signed the decree late Monday evening for pardon of punishment of convicted Taliban prisoners, reports Xinhua.
The move came one day after participants of a 3,400-member Loya Jirga, or the Grand Assembly, voted for the release of 400 hardcore Taliban inmates.
Read Also: 6,000 anti-Pakistan militants hiding in Afghanistan: UN
A peace deal agreement signed between the US and Taliban in Qatar in February required the Afghan government to free 5,000 Taliban inmates in exchange for Taliban's release of 1,000 soldiers or government staff.
Since early March, the Afghan government had released 5,100 Taliban inmates and Taliban freed 1,000 Afghan soldiers or government staff.
Under the agreement, US and NATO-led coalition forces would leave Afghanistan by July next year depending on whether the Taliban outfit meets the conditions envisaged in the agreement, including severing ties with foreign terrorist groups.
However, the presidential palace said provisions of the issued decree about Taliban pardon do not prevent individuals from suing for their right.
It was not immediately known when the 400 Taliban inmates will be freed.
According to unnamed officials, following the release of 400 Taliban inmates, the long-delayed peace talks between the Taliban and the Afghan government will begin later this month.