Nyusi won re-election in October with 73% of the vote, while the opposition alleged irregularities.
Several African heads of state and the president of Portugal, the former colonial power, attended the inauguration in the southern African country of 30 million people.
The crowning achievement of Nyusi's first term was meant to be the peace agreement signed in August with the armed opposition Renamo. Instead, it triggered fresh violence in central Mozambique by dissidents unhappy with the terms of the accord. More than 15 armed attacks on vehicles in central Mozambique have been reported in recent months, killing 21 people.
Nyusi's government is also battling to contain deadly attacks in the northernmost province of Cabo Delgado by extremists reportedly linked to the Islamic State group. An estimated 300 people have been killed, including by beheading, since the attacks began in 2017.
Cabo Delgado, Nyusi's home province, is home to two giant natural gas projects worth billions of dollars that Mozambique hopes will transform it into a middle-income country. Work has begun on one of the projects, which changed ownership last year from U.S.-based Anadarko to French oil major Total, with the aim to start producing liquified natural gas before Nyusi's mandate ends in late 2024. The second project, led by ExxonMobil, is set to reach a final investment decision this year.
Nyusi is expected to announce his cabinet in the coming days. International investors will be watching closely to see if the finance minister, Adriano Maleiane, will be replaced. Maleiane has guided the economy through exceptional difficulties following the discovery of $2 billion in debt taken on by three state-linked security companies, with government guarantees whose validity has been contested.
Maleiane's predecessor as finance minister, Manuel Chang, has been in a South African prison for more than a year contesting extradition to the United States to face charges in connection with the deals.
Last year Mozambique had to restructure its first-ever sovereign eurobond after it failed to make the first payment.
The inauguration comes as the rainy season again brings flooding to parts of Mozambique, which was hit last year by two major cyclones in less than two months, causing hundreds of deaths and major destruction. Recovery continues and widespread hunger has been a concern in the hard-hit rural areas.
Last week, the U.N. migration agency said the latest flooding destroyed the temporary shelters of almost 200 households that had been resettled in the central provinces of Tete and Zambezia.