New York Attorney General Barbara Underwood announced a lawsuit against Exxon Mobil on Wednesday, alleging the company misled its investors by understating risks from climate change regulations.

The suit also alleges that former CEO Rex Tillerson "knew of misrepresentations for years," the state said in a press release. The lawsuit states Tillerson particularly knew that Exxon was using different cost figures internally than the ones publicly disclosed. The company was making investment decisions using those different figures, the attorney general alleges.

"Tillerson allowed the significant deviation ... to continue uncorrected for years," the lawsuit said.

Underwood's lawsuit says Exxon "for years assured investors" that the company was accounting for costs from increasingly stringent climate change regulations. Exxon did not properly account for those costs, the state alleges, and instead misrepresented how much the company was exposed to the risks from tightening regulatory policies.

"Exxon built a facade to deceive investors into believing that the company was managing the risks of climate change regulation to its business when, in fact, it was intentionally and systematically underestimating or ignoring them, contrary to its public representations," Underwood said in a statement.

Exxon Mobil shares closed down 2.8 percent at $77.62 a share.

The company did not immediately respond to a CNBC request for comment.

The New York Attorney General's office first subpoenaed Exxon for information on what it knew about the impact of climate change on its business in November 2015. The U.S. Virgin Islands and Massachusetts followed suit shortly after. Exxon has fought unsuccessfully for several years to have the investigations dismissed and to keep certain accounting records secret.