Most opposition parliamentarians and some former leaders did not attend the ceremony to show their disapproval of what they call Mr Duda’s disregard for the constitution during his first term.
The political figures missing as Mr Duda took the oath of office, including predecessors Lech Walesa and Bronislaw Komorow, also accused him of almost total acceptance of the ruling right-wing party’s policies that have put Poland at odds with European Union leaders.
The key things are family, security, work, investment and dignity
The Government and Mr Duda remain popular with many Poles after introducing welfare payments and focusing on national pride.
Seeking to put a bitter election campaign behind him, the 48-year-old president vowed at his swearing-in ceremony to maintain openness to all groups and political parties.
But he also stressed the role of the family in Polish society and the need to protect it.
The comments echoed one of his key campaign messages, which depicted LGBT rights as a threat to Polish families.
“The key things are family, security, work, investment and dignity,” Mr Duda said.
Family, he said, is “the highest good and we must do everything to protect family and care for its development”.
Left-wing politicians wore brightly coloured clothes that evoked the rainbow and some wore rainbow masks to protest against what they consider to be the homophobia of Mr Duda and other conservative leaders.
Some held up copies of the constitution to signal their belief that the president has violated the country’s legal protections.
Parliament Speaker Elzbieta Witek swore in Mr Duda, who took his oath of office with his wife by his side.
He told the chamber that “every person is owed respect” and the Government in power since 2015 does “not make a division between better or worse Poles because of their earnings, their level of education, their views or their religion”.
On international matters, he stressed the need to focus on economic development in central and eastern Europe and the value of close co-operation with Nato and the US on security issues.
Mr Duda won 51% of the vote in a July 12 run-off against liberal Warsaw mayor Rafal Trzaskowski, who received 49%.
Almost 65% of eligible voters cast ballots in the nation of 38 million people.
Mr Duda said the high turnout is a sign that democracy Poland’s democracy is in good shape.
The inauguration on Thursday included other events, including a Mass at Warsaw’s cathedral and a ceremony in which the president, who is Poland’s commander-in-chief, had his authority over the armed forces renewed.