The former rebel commander took the oath in the grounds of the presidential palace.
"I swear allegiance to the republic of Sudan," said Kiir, who from 1983 until a peace treaty in January had fought against the Khartoum government for autonomy for Sudan’s southern people.
Afterwards Kiir, President Omar el-Bashir and Second Vice President Ali Osman Mohammed Taha stood for photographs. The ceremony was witnessed by hundreds of people, including foreign ambassadors.
When Kiir arrived in Khartoum Wednesday, four days after Garang’s funeral in Juba, southern Sudan, it was his first visit to the capital since he and Garang deserted the national army and founded the Sudan People’s Liberation Army in 1983.