Wednesday's decision by a Suffolk Superior Court judge is a win for Attorney General Maura Healey, who's trying to determine if the company deceived investors and consumers by hiding what it knew about the link between burning fossil fuels and climate change.
An Exxon Mobil Corp. spokesman said the company, based in Irving, Texas, is reviewing the decision to determine its next steps.
An aide to Healey said the ruling affirmed the longstanding authority of the attorney general to investigate fraud.
"Exxon must now end its obstructive tactics and come clean about whether it misled Massachusetts consumers and investors about what it knew about climate change, its causes and effects," Healey spokeswoman Chloe Gotsis said in a written statement.
The judge ruled that Exxon Mobil, a global oil and gas company, faced a heavy legal burden in trying to show a reason it shouldn't have to turn over the information.
"There is no requirement that the Attorney General have probable cause to believe that a violation (of the law) has occurred," Judge Heidi Brieger wrote. "She need only have a belief that a person has engaged in or is engaging in conduct declared to be unlawful."
The judge added that, while the attorney general must not act arbitrarily or in excess of her statutory authority, "she need not be confident of the probable result of her investigation."
The legal battle began last year, when Healey and New York Attorney General Eric Schneiderman, both Democrats, demanded documents from the firm dating to 1976.
A related case is pending in Texas, where Exxon Mobil is trying to get a federal court to quash Healey and Schneiderman subpoenas of its documents related to climate change.
In October, the company said the two attorneys general "are incapable of impartial investigations and are attempting to silence political opponents who disagree on the appropriate policies to address climate change."
A federal judge there last month canceled a scheduled deposition by Healey without explanation. Briefs in that case are due Feb. 1.