The strategy could be as simple as mirroring the blueprint laid out by their Republican colleagues, who made something of a legal specialty of tormenting President Obama. Conservative attorneys general in states including Texas, Virginia and Florida have sued the Obama administration dozens of times, systematically battering Mr. Obama’s signature health care, environmental and immigration policies in the courts.

One of them, Scott Pruitt, the attorney general of Oklahoma, who used his office to bayonet Mr. Obama’s clean-energy regulations, was just chosen by Mr. Trump to become the new head of the Environmental Protection Agency.

Mr. Schneiderman — who established himself early as a nuisance to Mr. Trump when he sued him over Trump University, negotiating a $25 million settlement — pounced on the Pruitt selection, calling him “an agent of the oil and gas industry” and promising to push an E.P.A. under Mr. Pruitt to uphold environmental laws. Ms. Healey has also expressed concern about the nominations of Mr. Pruitt and Mr. Tillerson.

The jockeying to begin hostilities with the Trump administration is a measure of how the country’s widening political divide has transformed the offices of state attorneys general into legal laboratories and sharpened them into political scalpels.

They were once primarily local law enforcement figures who rarely pursued issues beyond state borders. But with the growth of their clout and ambition over the last three decades, they have become magnets for lobbyists, campaign donors and other corporate representatives looking to intervene in regulatory policy and tip investigations, a New York Times investigation found in 2014.

Under President Bill Clinton, attorneys general pioneered the major multistate lawsuit that has served as a model for interstate collaboration since, with nearly all the states joining together to win a groundbreaking settlement with the tobacco industry. Liberal states later collaborated to force the E.P.A. under President George W. Bush to regulate greenhouse gas emissions, winning a Supreme Court decision that made it easier for the states to sue the federal government.