The centrist Liberals started the campaign in third place but in a stunning turnaround now command a majority.
Justin Trudeau, the 43-year-old son of late PM Pierre Trudeau, said Canadians had voted for real change.
Incumbent Conservative PM Stephen Harper accepted defeat and his party said he will step down as leader.
It was the longest campaign in Canada’s history, and had been thought to be much closer.
Speaking after the polls closed, Stephen Harper said he had already congratulated Justin Trudeau, saying the Conservatives would accept the results “without hesitation”.
Addressing his jubilant supporters shortly afterwards, Justin Trudeau said that Canadians “sent a clear message tonight – it’s time for a change”.
“We beat fear with hope, we beat cynicism with hard work. Most of all we defeated the idea that Canadians should be satisfied with less.
“This is what positive politics can do,” he said.
Justin Trudeau also praised Stephen Harper for his service to Canada.
Few had predicted a Liberal victory on this scale. They look set to win 184 seats, a huge increase from only 36 that they held after suffering their worst-ever election result in 2011.
Liberals become the first party ever to move from third place in parliament to a majority in one election.
Meanwhile, the left-leaning New Democratic Party (NDP) is on course to win 44 seats, less than half the number they held in the outgoing parliament.
“I congratulated Mr. Trudeau on his exceptional achievement,” said NDP leader Tom Mulcair.
Early counts in the eastern provinces gave the Liberals their first taste of victory, as they led in all 32 races there.
The Conservatives are now in danger of losing all 13 seats they held in Atlantic Canada in 2011.
Justin Trudeau campaigned on a promise of change, urging voters ahead of the polling day to “come together as a country”.
His charismatic father, Pierre Trudeau, is considered the father of modern Canada.
Stephen Harper, 56, portrayed himself as the steady hand who could steer Canada’s troubled economy back on track.
His campaign ran TV advertisements saying that Justin Trudeau was “just not ready” to take office.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…