But even as Ashraf Ghani spoke, a bomb ripped through a mosque compound in northern Balkh province after prayers for the Eid al-Fitr holiday, which follows the fasting month of Ramadan.
Sarajuddin Abid, the district governor of Sholgara where the explosion happened, said two people were killed and 12 were wounded in the blast.
No one immediately claimed responsibility for the attack.
Ghani, who spoke at the presidential palace in the capital, Kabul, has made peace talks with the Taliban a priority for since he was elected president last year. This was his first Eid message to the nation.
Also Read
He also thanked Mullah Mohammad Omar, the reclusive Afghan Taliban leader, for endorsing the peace talks and said it was important the Taliban "want to join the political process."
Earlier in July, neighboring Pakistan hosted the first face-to-face Kabul-Taliban talks, supervised by US and Chinese representatives. The meeting was said to have made progress, with the two sides agreeing to work on confidence-building measures and hold more such meetings after Ramadan.
In the wake of the departure of NATO combat forces at the end of last year, the Taliban have stepped up attacks on Afghan troops, which are now in charge of security in the country, and are also targeting government officials.