His Liberal Party has delivered unexpectedly strong results despite having been weakened by a series of scandals that cast doubt on his judgement and tarnished his image as a liberal icon.
The Liberal Party was projected to win the most seats in the 338-seat Parliament, giving it the best chance to form the next government. However, the Canadian Broadcasting Corporation said it would be a minority government, forced to rely on an opposition party to stay in power.
"It's not quite the same as 2015. It's not all owing to the leader," said Robert Bothwell, a professor of Canadian history and international relations at the University of Toronto.
"Trudeau is prime minister because the rest of the party was able to pull itself together and prevail. While Trudeau certainly deserves credit for what has happened he's really going to have to demonstrate qualities that he hasn't yet shown."
Still, the results were a victory for Mr Trudeau, whose clean-cut image took a hit after old photos of him in blackface and brownface surfaced last month.
"I'm surprised at how well Trudeau has done," said Nelson Wiseman, a political science professor at the University of Toronto. "I don't think anybody expected Trudeau to get a majority but they are not that far off."
Trudeau vs Scheer
The Canadian vote came down to what was essentially a choice between the handsome and charismatic Mr Trudeau and the Conservatives' unassuming leader, Andrew Scheer, who was seen as the perfect antidote to the prime minister's flash and celebrity.
Mr Trudeau reasserted liberalism in 2015 after almost 10 years of Conservative Party government in Canada, but scandals combined with high expectations damaged his prospects.
Perhaps sensing Mr Trudeau was in trouble, Barack Obama made an unprecedented endorsement by a former American president in urging Canadians to re-elect Mr Trudeau and saying the world needs his progressive leadership now.
Mr Trudeau, son of the liberal icon and late Prime Minister Pierre Trudeau, is one of the few remaining progressive world leaders in the Trump era and even appeared on the cover of Rolling Stone magazine under the headline "Why Can't He Be Our President?"
Mr Bothwell said he expected Mr Scheer to resign.
"He's gone," he said. "He ran a really dirty campaign. There is nothing to be proud of on his side. He had the opportunity and blew it."Among other things, Mr Scheer called Mr Trudeau a phoney who could not even remember how many times he had worn blackface.
Mr Trudeau also was hurt by a scandal that erupted this year when his former attorney general said he pressured her to halt the prosecution of a Quebec company.
Mr Trudeau has said he was standing up for jobs, but the damage gave a boost to the Conservative Party.
Mr Trudeau's Liberals will probably rely on the New Democrats to form a new government and stay in power.
Mr Wiseman, from the University of Toronto, said he expected the New Democrats would largely support Mr Trudeau, and other parties would not be pushing for an election in the short term.
Mr Scheer had promised to end a national carbon tax and cut government spending, including foreign aid, by 25%.
Mr Trudeau embraced immigration at a time when the US and other countries are closing their doors, and he legalised cannabis nationwide.
His efforts to strike a balance on the environment and the economy have been criticised by both the right and left.
He brought in a carbon tax to fight climate change but rescued a stalled pipeline expansion project to get Alberta's oil to international markets.
His also negotiated a new free trade deal for Canada with the US and Mexico amid threats by US President Donald Trump to scrap it.