The militants said foreign forces would be excluded from the ceasefire and that operations against them would continue.
In addition, major partners of Afghanistan have welcomed the announcement of a unilateral ceasefire by calling it a positive step towards peace.
"Hope the pleasure of shedding no Afghan blood in Eid becomes so overwhelming that rest of year is also declared as Afghan Eid", he said on Twitter.
The government cease-fire will begin on June 12 and last through Eid al-Fitr holiday, June 19, not including al Qaida or ISIS.
Eid is the biggest festival in the Muslim calendar when families visit each other's homes, enjoy feasting and in Afghanistan tend graves of fallen loved ones.
But just how that settlement could be negotiated has proved to be a hard task, compounded by several factors, including the Taliban's long but increasingly complicated relationship with the Pakistani military as a source of support, a weak interlocutor in the government in Kabul that's marred by infighting, and the breakdown of consensus among regional players including Iran and Russian Federation, who have stakes in an endgame in Afghanistan.
Glenn Beck reflects on Anthony Bourdain loss, America's search for answers
It brought the suicides of two celebrities: fashion designer Kate Spade and TV food and travel journalist Anthony Bourdain . In a country that has as many privately owned guns as it does people, this presents a unique public health problem.
It will see a three-day halt in hostilities against the country's security forces, which has been greeted with relief by war-weary Afghans. "If different factions don't accept the ceasefire, then attacks will continue".
In three provinces, more than 50 members of the Afghan security forces and pro-government militias were killed overnight, government officials said Saturday.
The palace statement referred to a gathering of Afghanistan's top clerics last week in which they issued a decree against suicide attacks and called for peace talks.
The clerics also recommended a ceasefire with the Taliban and Ghani endorsed the recommendation.
Government forces will not stop fighting other militants, like the Islamic State (IS) group. He first spoke about the possibility of a cease-fire with the militant Islamic group in February as part of a potential agreement where the government would be willing to recognize the Taliban as a legitimate political party.
Foreign troop levels in the country have dropped to around 15,000, although US President Donald Trump a year ago announced more air strikes in the country and wiped troop withdrawal deadlines.
Afghan security forces say the impact has been significant, but the Taliban roam huge swaths of the country and, with foreign troop levels of about 15,600, down from 140,000 in 2014, there appears little hope of outright victory.