But the new deal would not suffer the same fate, Kiir told reporters.
President Salva Kiir and his bitter rival Riek Machar were in neighboring Sudan to sign the deal, under which the rebel leader is set to return to a unity government as the first of five vice presidents, an AFP correspondent reported.
Held at Friendship Hall in Khartoum, the ceremony was graced by Museveni, Sudan leader Omar Al Bashir, Kenya's Uhuru Kenyatta of Kenya, Ismail Omar Guelleh of Djibouti, Somali Prime Minister Hassan Ali Kheire and Ethiopian Deputy Prime Minister, Demeke Mekonnen.
South Sudan's almost five year conflict began after Kiir accused his sacked vice president Machar of plotting a coup against him in 2013.
The most recent deal was signed in 2015 but it did not help to end the conflict.
The war has killed tens of thousands, displaced some four million people and left the oil-rich country's economy in ruins.
Russia Rolls Back Most of Oil Cuts as Supply Risks Worsen
The net imports averaged 6.44 million barrels per day last week, up by 1.35 million barrels per day from the previous week. To be sure, production jumped from a year ago-by 13.3 percent from the 9.217 million bpd production in May last year.
"The 2016 conflict was forced on us, this is why when we signed the agreement I signed with 26 reservations and the agreement collapsed before us".
President Kiir also said the remaining outstanding issues will be finalized with his rivals as soon as he arrives in Khartoum.
"This agreement (2018) will not collapse and I am sure that it will not collapse because the people of South Sudan have now agreed that they must make peace among themselves", he said.
Kiir's side will take 20 slots in the new 35-member government, while Machar's SPLM-IO and other smaller opposition groups will take the rest. "Whoever signs this agreement will be committed to it", Kiir said, adding that this will mark a departure from past agreements that have collapsed.
South Sudan became independent from Sudan in 2011, but civil war broke out two years later between the government led by Kiir and a rebel movement led by Machar. It has been wracked by civil war, which has seen ethnic cleansing and numerous atrocities, since 2013.