U.S. special envoy Zalmay Khalilzad, Ambassador Ross Wilson, U.S. and NATO forces commander Gen. Scott Miller and diplomats from the European Union, Canada, Australia, Denmark, Germany and Norway attended the ceremony.
Ghani spoke of ridding the system of "the evil of corruption and bureaucracy," and urged attendees to stay calm amid sounds of explosions.
"We have seen major attacks. Don't be afraid by two small blasts," he said.
Analysts said persistent opposition from Abdullah could undermine intra-Afghan talks this week, which are part of a U.S. peace deal with the Taliban.
Under the deal, U.S. forces will begin a phased withdrawal in exchange for a pledge by the Taliban to engage in the intra-Afghan negotiations. The militant group has long been opposed to holding any peace talks with the Afghan government.