A peace deal ending the 1998-1999 border conflict has never been fully implemented and there has been tension between the neighbours ever since.
The countries have also agreed to re-establish trade and diplomatic ties.
The declaration came at a landmark meeting between the two countries' leaders in Eritrea's capital, Asmara.
The summit between Eritrea's President Isaias Afewerki and Ethiopia's Prime Minister Abiy Ahmed marked the first time the neighbours' heads of state had met for nearly two decades.
On Monday, the leaders agreed that "a new era of peace & friendship has been ushered [in]", Eritrea's Information Minister Yemane Gebre Meskel said on Twitter.
BBC