"I, Ismael Omar Guelleh, swear before God and my people that I will assume this heavy mission with transparency and justice," he said during a ceremony attended by several regional leaders, including Presidents Omar al-Bashir of Sudan, Meles Zenawi of Ethiopia and Sharif Cheikh Ahmed of Somalia.
Beshir attended the ceremony even though he is wanted by the International Criminal Court (ICC) on charges of genocide, war crimes and crimes against humanity in Sudan's western Darfur region and Djibouti is party to the ICC.
ICC statutes dictate any member country should arrest him if he visits, and Bashir had not travelled to Djibouti since he was first indicted by the ICC in 2009.
France, Djibouti's former colonial ruler, was represented at the inauguration by Cooperation Minister Henri de Raincourt while the United States sent its deputy assistant secretary of state for African affairs, Karl Wycoff.
Guelleh, in power since 1999, won a third term with around 80 percent of the vote in the April 8 election that was boycotted by the opposition, defeating his only challenger, Mohamed Warsama Ragueh, a former head of the constitutional council running as an "independent".
Last year, Guelleh had parliament amend the constitution to allow him to seek another term, trimmed down to five years from six, sparking an opposition outcry and fuelling unprecedented demonstrations in February.
Opposition leaders at the time had hoped to turn a student movement into an Egypt-style protest to demand regime change but the largest demonstration turned violent on the first day and soon fizzled out.
The protests were the largest since Djibouti obtained its independence from France in 1977.