BBC Director-General Tim Davie said the legislation "appears to criminalise the process of independent journalism".
The Kremlin objects to the conflict being called a war, instead calling it a "special military operation".
BBC News in Russian will still be produced from outside the country.
Access to BBC websites had already been restricted in Russia. News outlets Deutsche Welle, Meduza and Radio Liberty also had their services limited, Russia's state-owned news agency RIA said.
Later on Friday, Canada's public broadcaster and Bloomberg News said they too had temporarily halted reporting from Russia, and news channel CNN said it would stop broadcasting in the country.
Responding to the legislation passed by the Russian authorities, BBC Director-General Tim Davie said: "It leaves us no other option than to temporarily suspend the work of all BBC News journalists and their support staff within the Russian Federation while we assess the full implications of this unwelcome development.
"Our BBC News service in Russian will continue to operate from outside Russia.
"The safety of our staff is paramount and we are not prepared to expose them to the risk of criminal prosecution simply for doing their jobs. I'd like to pay tribute to all of them, for their bravery, determination and professionalism.
"We remain committed to making accurate, independent information available to audiences around the world, including the millions of Russians who use our news services. Our journalists in Ukraine and around the world will continue to report on the invasion of Ukraine."
Record numbers of people have read the BBC's Russian language news website since the invasion, seeking up-to-date information on the conflict.
The announcements from global media outlets come a day after one of Russia's last independent news outlets, TV Rain, stopped broadcasting after coming under pressure for its coverage of the invasion.
The channel ended its final broadcast by showing staff walking off set.
Russia's telecommunications regulator had accused the channel of "inciting extremism, abusing Russian citizens, causing mass disruption of public calm and safety, and encouraging protests".
"No to war," said Natalia Sindeyeva, one of the channel's founders, as employees walked out of the studio.
The channel then began playing footage of a performance of Tchaikovsky's Swan Lake.
The ballet was used in Soviet-era broadcasts to mark the death of leaders, and was also played during the 1991 coup that contributed to the end of the Soviet Union.
The station's editor in chief, Tikhon Dzyadko, left Russia on Wednesday, saying it was due to concerns for his safety.
"The main problem is that we were covering Ukraine objectively, as professional journalists and covering from different sides. We had journalists going live and covering the situation," Ekaterina Kotrik, TV Rain presenter and former head of news, told the BBC.
She had to leave Russia due to the new law which could lead to prison terms of up to 15 years for people who intentionally spread what the Kremlin terms "fake" information about Russia's armed forces.
"Fifteen years in jail for just doing your job," Ms Kotrik said. "It's the end of democracy in Russia. Any freedom is lost."
Radio station Echo of Moscow was taken off air on Tuesday. On Thursday it was shut entirely by its board of directors and on Friday it was reported by Russia's Interfax agency that the lease at its office had been terminated and its website disabled.
Ekaterina Schulman is a political scientist who was presenting a programme on the station when it was taken off air.
"People like me might find ourselves with nowhere to work. Very soon there won't be media outlets, or lecture halls or other platforms where we can talk to the public," she told the BBC.
Russia's state-controlled TV has depicted the war in a very different way to broadcasts seen around the rest of the world.
"Every deviation from the official narrative about this war is now punishable with jail," Mikhail Fishman, an independent journalist and commentator who recently left Russia, told the BBC.
"Everyone I know in Russian independent journalism has already left Russia or is trying desperately to do so now."
The newspaper Novaya Gazeta said in a tweet on Friday (in Russian) that it was removing material on the conflict, because of the threat of prosecution to journalists and other citizens disseminating information which differed from Russian defence ministry press releases.
The newspaper is run by Dmitry Muratov. He won the Nobel Peace Prize in 2021, along with Maria Ressa of the Philippines, for efforts to safeguard freedom of expression.
The crackdown on independent journalists comes as Russia's economy has been hit by sanctions. Its currency, the rouble, has plunged in value, hitting the savings of citizens.
Ukrainian President Volodymyr Zelensky has accused Russia of "nuclear terror" after it reportedly bombarded a large nuclear power station, causing a fire in a nearby building.
Russian President Vladimir Putin has insisted the war in Ukraine is "going to plan".
The BBC has issued a statement on how to access its content via circumvention tools.