The bill forces big platforms to compensate news publishers for content posted on their sites.
Meta and Google have both already been testing limiting access to news to some Canadians.
In 2021, Australian users were blocked from sharing or viewing news on Facebook in response to a similar law.
Canada's Online News Act, which cleared the senate on Thursday, lays out rules requiring platforms like Meta and Google to negotiate commercial deals and pay news organisations for their content.
Meta has called the law "fundamentally flawed legislation that ignores the realities of how our platforms work".
On Thursday, it said news availability will be ended on Facebook and Instagram for all users in Canada - before the bill takes effect.
"A legislative framework that compels us to pay for links or content that we do not post, and which are not the reason the vast majority of people use our platforms, is neither sustainable nor workable," a Meta spokesperson told Reuters.
The company said the changes to news would not have an impact on other services for Canadian users.
Google called the bill "unworkable" in its current form and said it was seeking to work with the government to find a "path forward".
The federal government says the online news bill is necessary "to enhance fairness in the Canadian digital news market" and to allow struggling news organisations to "secure fair compensation" for news and links shared on the platforms.
An analysis of the bill by an independent parliament budget watchdog estimated news businesses could receive about C$329m ($250m; £196m) per year from digital platforms.
Earlier this month, Canadian Heritage Minister Pablo Rodriguez told Reuters the tests being run by the tech platforms were "unacceptable" and a "threat".
In Australia, Facebook restored news content to its users after talks with the government led to amendments.
On Thursday, Mr Rodriguez's office said he had met both Google and Facebook this week and planned further discussions - but the government would move forward with the bill's implementation.
"If the government can't stand up for Canadians against tech giants, who will?" he said in a statement.
Media industry groups hailed the bill's passage as a step towards market fairness.