Ghani made the announcement at a ceremony held in Darul Aman Palace to mark the Independence Day in the country.
He said the ceasefire would be implemented for as long as the Taliban respect it.
The president further said he has taken the decision after consulting with segments of Afghan society including religious scholars, political parties, politicians, women and civil society leaders, youth and members of high peace council in all 34 provinces.
He stressed that the ceasefire came in respect to the wishes of the religious scholars of the Islamic world that were gathered in the holy mosques and to respect the wishes of the Organization of Islamic Countries (OIC), the custodians of the two holy mosques, the King of Saudi Arabia, Afghanistan High Peace Council and Ulema Council.
“We announce a ceasefire that would take effect from tomorrow (Monday), the day of Arafa, until the day of the birth of the prophet i.e., Milad-un-Nabi, (which will be after three months),” Ghani said.