President Trump’s tax filings may have already been leaked, but the disclosure failed to dissuade New York Democrats from their campaign to obtain the president’s taxes via the legislative process.

The New York Senate passed Wednesday a bill to allow the state Department of Taxation and Finance to release the tax returns of any state resident—such as Mr. Trump—to certain congressional committees, sending the measure to the Assembly.

“We are facing a constitutional showdown,” tweeted Democratic state Sen. Brad Hoylman, the bill’s sponsor. “New York, as the home of the President’s state taxes, has a special responsibility to step into the breach.”

Republicans balked at the measure—which was approved along party lines—arguing that the legislature should focus on issues closer to home and accusing Democrats of blatant political maneuvering.

“I find that extremely troubling. This is bad public policy,” said Senate Minority Leader John Flanagan, while New York GOP chairman Ed Cox called it “a bill of attainder, aimed at one person.”

The New York Times released Wednesday what it said were 10 years of printouts from Mr. Trump’s tax transcripts from 1985-94. The documents showed that he lost more than $1 billion during that time, prompting the president to tweet that the report was a “Fake News hit job!”

The vote came after Treasury Secretary Steve Mnuchin refused Monday a request from House Ways and Means Committee chairman Richard Neal for Mr. Trump’s tax filings, saying the request was “unprecedented” and “presents serious constitutional questions.”

At least four other Democrat-controlled states—California, Hawaii and Illinois and New Jersey—have made headway this year on bills requiring presidential candidates to release their tax returns as a condition for appearing on the ballot.

In Washington state, a similar bill passed the state Senate but died when the legislative session ended last month without a House vote.

The California state Senate approved last week a bill requiring presidential contenders to release five years of tax returns on a party-line vote. The measure is now under consideration in the Assembly.

Both California and New Jersey approved bills in 2017 blocking presidential candidates from appearing on the ballot unless they turn over their tax returns, but the measures were vetoed by both governors, California Gov. Jerry Brown and New Jersey Gov. Chris Christie.

In New York, the state Senate also passed a bill supported by Attorney General Letitia James to close the so-called “double jeopardy loophole” by allowing her office to bring criminal charges against individuals who have been pardoned by the president.

“This legislation upholds the standards of fairness and justice at the core of the ‘double jeopardy’ law,” Ms. James said in a statement. “It also embodies a central component to the foundation of our democracy: the president—unlike a monarch or authoritarian dictator—is not above the law and our laws should apply to all people of this nation equally, including and especially our leaders.”