Exxon sued to block the investigation in a federal court in Dallas in June 2016, claiming that the cases were politically motivated and violated the company’s constitutional rights.

The initial judge in the case, Ed Kinkeade, of United States District Court for the Northern District of Texas, seemed sympathetic to Exxon and went so far as to order in-person depositions of Mr. Schneiderman and Ms. Healey in Dallas. But in 2017, he ruled that he had no jurisdiction over the case, a point that Mr. Schneiderman and Ms. Healey had strenuously argued, and transferred the case to New York.

Judge Caproni was less enamored of the company’s arguments and occasionally showed frustration in hearings on the matter. “I have a different view of this case than Judge Kinkeade,” she said in one hearing, and when the company’s lawyers argued that they were asking only for “narrow” additional investigations of the attorneys general, she responded, “Give me a break.”

In its suit, Exxon focused on meetings that the states had with activists on climate issues, including representatives of the Rockefeller Family Fund, and on a news conference in New York that was attended by former Vice President Al Gore, which Exxon argued showed that the case was being pursued in bad faith by the state officials.

Judge Caproni rejected those arguments roundly. “Some statements made at the press conference were perhaps hyperbolic, but nothing that was said can fairly be read to constitute declaration of a political vendetta against Exxon,” she wrote. “Exxon’s allegations that the AGs are pursing bad faith investigations in order to violate Exxon’s constitutional rights are implausible and therefore must be dismissed for failure to state a claim.”