Ashraf Ghani was responding to demands submitted to him by a traditional council, or loya jirga, which met in Kabul this week to discuss peace.
The grand assembly called for an immediate ceasefire between the Afghan government and Taliban militants.
But the Taliban has so far refused to engage in direct peace talks with Mr Ghani's government.
The militants are negotiating directly with a US envoy in Qatar, as Washington seeks to wind up the longest war in its history, which began in 2001 after the 9/11 attacks.
Since October, US officials and representatives of the Taliban have held direct talks. A potential deal has emerged that would see foreign troops withdraw in return for the insurgents guaranteeing that Afghan territory would not be used as a base by foreign militants.
But there are fears, including among Afghanistan's women, that any US deal with the Taliban could eventually see the militants sweep back into power and strip away rights and freedoms gained since they were toppled in 2001.
The Taliban has shunned direct talks with the Afghan government, calling it "a US-imposed puppet regime".
The group has not yet responded to the proposed release of its prisoners nor the demand for a ceasefire.
President Ghani has never announced before the release of so many Taliban prisoners and he also said they'd be welcomed in Kabul. It was a concrete response to the loya jirga's demands - which also included a practical timetable for the withdrawal of foreign troops, a Taliban political office in Kabul and an immediate and comprehensive ceasefire.
President Ghani said he was ready to accept a ceasefire - as long as it was bilateral. Historic short-term ceasefires - unilateral and bilateral - were implemented last year. But the key question is how the Taliban responds. A timetable for the withdrawal of foreign forces is one of its keys demands but it wants that withdrawal to be implemented decisively and with immediate effect, not a phased process as the loya jirga seems to suggest.
And it's unlikely to accept the loya jirga's demand that the new constitution - which safeguards human and women's rights - should be protected. The Taliban is currently focused on its own talks with the US and so far refuses to engage with a government it sees as illegitimate.
A US-led military coalition overthrew the Taliban in 2001 for sheltering al-Qaeda.
Intense fighting is currently taking place all over the country, and the Taliban now control more territory than at any point since 2001.
Given the continued stalemate with the insurgents, US President Donald Trump is keen to end the war, which, according to US officials, costs about $45bn (£34bn) annually.
More about: Afghanistan