The breakthrough, which sees Abdullah heading peace talks with the Taliban, comes as Afghanistan battles a rapid spread of the deadly coronavirus and surging militant violence that saw dozens killed in brutal attacks last week.
The United States and NATO welcomed the agreement, with both calling for a renewed peace push in the war-wracked country.
“Doctor Abdullah will lead the National Reconciliation High Commission and members of his team will be included in the cabinet,” Ghani spokesman Sediq Sediqqi said on Twitter.
Abdullah’s spokesman, Fraidoon Khawzoon, told AFP the agreement ensures that Abdullah’s group will get 50 percent of cabinet positions and other provincial governors’ posts.
Ghani hailed a “historic day” for Afghanistan, noting that the agreement was reached without any international mediation.
“We will share the burden and our shoulders, God willing, will be lighter,” he said, addressing Abdullah at the signing ceremony broadcast on a state-run television channel.
“In the days ahead, we hope that with unity and cooperation, we would be able to first pave the ground for a ceasefire and then lasting peace.”
Abdullah said the deal commits to forming a “more inclusive, accountable and competent administration”.
“It’s meant to ensure a path to peace, improve governance, protect rights, respect laws and values,” he said on Twitter after signing the deal.
The agreement says that Ghani will make Abdul Rashid Dostum, his former vice president turned ally of Abdullah, a marshal of the armed forces.
Dostum, a notorious former warlord, is accused of ordering the torture and rape of a political rival in 2016.