Mr Abiy held talks with the host President Ismail Omar Guelleh and also addressed the Djibouti parliament
Ethiopia also agreed to apportion to Djibouti shares in its major firms of their choice
The Djibouti government accused DP-World of funding an exiled opposition leader and businessman
The Djibouti governments has agreed to Ethiopia's proposal for acquiring a share of the former's port.
The agreement comes after Djibouti unilaterally annulled a contract with the United Arab Emirates' giant Dubai Ports World (DP) two months ago.
Ethiopia Prime Minster Abiy Ahmed secured the agreement on his first foreign visit as head of state to Djibouti over the weekend.
Mr Abiy held talks with the host President Ismail Omar Guelleh and also addressed the Djibouti parliament.
Ethiopian government spokesman Ahmed Shide said the percentage apportioned was yet to be determined by experts after assessing the value and profit margins of the port.
Major firms
Formal agreements will be signed within two months and experts from both countries have been tasked to do the paper work, according to Mr Ahmed.
Ethiopia also agreed to apportion to Djibouti shares in its major firms of their choice, including the Ethiopian Airlines. Djibouti also shown an interest in agricultural activities in Ethiopia.
The tiny Djibouti has previously been allowed to pump 200 metric cube drinking water daily from Ethiopia's Somali region.
More than 95 per cent of Ethiopia's import and export trade passes through the Djibouti Port.
A serious disagreement erupted between DP-World, the main port administrator, and the Djibouti government last January.