Judge R. Bruce Cozzens on Wednesday said the tax "does not serve a substantial state interest" and therefore needed home rule messages, which allows the state to engage in local matters.
The tax charges employers in the metro region 34 cents for every $100 of payroll. It was passed in 2009 to avert service cuts as the MTA faced a record deficit.
The ruling was a victory for Nassau County which had filed suit against the state legislature for enacting the tax.
The MTA, which operates the Long Island and Metro-North railroads, and the New York City transit system, says it "will vigorously appeal" the ruling.
Get Eyewitness News Delivered