The other companies either did not comment or did not immediately respond to a request for comment.
De Blasio and the city comptroller, Scott Stringer, have come under pressure for several years from activists to rid New York's pension funds of any link to fossil fuels, with some environmentalists claiming the city has been too slow to use its clout to tackle climate change.
New York City is breaking up with big oil.
The court filing claims that just 100 fossil fuel producers are responsible for almost two-thirds of all greenhouse gas emissions since the industrial revolution, with the five targeted companies the largest contributors.
The City said it will be seeking damages from BP, Chevron, ConocoPhillips, Exxon Mobil, and Royal Dutch Shell for the billions of dollars it will spend to protect New Yorkers from the effects of climate change. "Lawsuits of this kind - filed by trial attorneys against an industry that provides products we all rely upon to power the economy and enable our domestic life - simply do not do that".
"This lawsuit is factually and legally meritless, and will do nothing to address the serious issue of climate change". Shell's spokesman echoed that sentiment.
Cities in California have filed similar lawsuits.
The Mayor also announced a goal to divest City funds from fossil fuel reserve owners within five years that would make New York City the first major U.S. pension plan to do so. Liz Krueger who said, "Divestment sends the clear message that it is no longer acceptable to support companies whose fundamental business model puts our entire society at risk".More news: Twitch Paid $90 Million To Broadcast The Overwatch League
Stringer admitted the divestment will be "complex" and will take some time but said the city's pension funds could promote sustainability while also protecting the retirement of teachers, police officers and other city workers.
Climate campaigners heaped praise on the city as well.
The city's five pension funds hold $189 billion in assets, and roughly $5 billion of that amount are held in the securities of over 190 fossil fuel companies, the city said. He and state Comptroller Thomas DiNapoli are creating an advisory committee to examine the way to proceed with divestment.
According to Betámia Coronel, U.S. reinvestment coordinator at 350.org, "Divesting our city's pensions from the dirtiest companies is an enormous hard-won first step; holding companies like Exxon accountable for their role in climate deception is next".
Philanthropies have included the Wallace Global Fund and the Rockefeller Brothers Fund, notable because the late John D. Rockefeller grew his wealth as an oil baron.
With NYC becoming the first major US city to call for divestment-a call more than 800 institutions have heeded-and a growing number of municipalities filing suit against the industry, climate activists say it's clear "the global tide is turning".
The American Petroleum Institute, the powerful oil lobby, accused NY of "deliberately hurting pension holders" by ignoring its legal responsibility of seeking the greatest return.
The National Association of Manufacturers, which represents the oil companies, slammed NY for joining a "politically-motivated campaign to undermine manufacturing in America". "The mayor's announcement may raise his profile, but it will do nothing to address climate change and will ultimately fail".