I'm not familiar with NY law as a lawyer, but for NY, there is the Civil Practice Act, Article 51, Section 879 - "Restrictions upon injunction to restrain state officers", which restricts injunctions against state officers (or their employees) carrying out a duty by statute save by the Supreme Court, and I would assume this applies to the NY tax code:
There is also Section 692 of NY's tax code:
§ 692. Collection, levy and liens.--(a) Collection procedures.-- The
taxes imposed by this article shall be collected by the tax commission,
and it may establish the mode or time for the collection of any amount
due it under this article if not otherwise specified. The tax commission
shall, upon request, give a receipt for any sum collected under this
article. The tax commission may authorize banks or trust companies which
are depositaries or financial agents of the state to receive and give a
receipt for any tax imposed under this article in such manner, at such
times, and under such conditions as the tax commission may prescribe;
and the tax commission shall prescribe the manner, times and conditions
under which the receipt of such tax by such banks and trust companies is
to be treated as payment of such tax to the tax commission.
(b) Notice and demand for tax.--The tax commission shall as soon as
practicable give notice to each person liable for any amount of tax,
addition to tax, penalty or interest, which has been assessed but
remains unpaid, stating the amount and demanding payment thereof. Such
notice shall be left at the dwelling or usual place of business of such
person or shall be sent by mail to such person's last known address.
Except where the tax commission determines that collection would be
jeopardized by delay, if any tax is assessed prior to the last date
(including any date fixed by extension) prescribed for payment of such
tax, payment of such tax shall not be demanded until after such date.
(c) Issuance of warrant after notice and demand.--If any person
liable under this article for the payment of any tax, addition to tax,
penalty or interest neglects or refuses to pay the same within
twenty-one calendar days after notice and demand therefor is given to
such person under subsection (b) of this section (ten business days if
the amount for which such notice and demand is made equals or exceeds
one hundred thousand dollars), the commissioner may within six years
after the date of such assessment issue a warrant under the
commissioner's official seal directed to the sheriff of any county of
the state, or to any officer or employee of the department, commanding
him to levy upon and sell such person's real and personal property for
the payment of the amount assessed, with the cost of executing the
warrant and to return such warrant to the commissioner and pay to him or
her the money collected by virtue thereof within sixty days after the
receipt of the warrant. If the commissioner finds that the collection
of the tax or other amount is in jeopardy, notice and demand for
immediate payment of such tax may be made by the commissioner and upon
failure or refusal to pay such tax or other amount the commissioner may
issue a warrant without regard to the twenty-one day period (or ten-day
period if applicable) provided in this subsection.
(d) Copy of warrant to be filed and lien to be created.--Any sheriff
or officer or employee who receives a warrant under subsection (c) shall
within five days thereafter file a copy with the clerk of the
appropriate county. The clerk shall thereupon enter in the judgment
docket, in the column for judgment debtors, the name of the taxpayer
mentioned in the warrant, and in appropriate columns the tax or other
amounts for which the warrant is issued and the date when such copy is
filed; and such amount shall thereupon be a lien upon the title to and
interest in real, personal and other property of the taxpayer. Such lien
shall not apply to personal property unless such warrant is filed in the
department of state.
(e) Judgment.--When a warrant has been filed with the county clerk the
tax commission shall, in the right of the people of the state of New
York, be deemed to have obtained judgment against the taxpayer for the
tax or other amounts.
(f) Execution.--The sheriff or officer or employee shall thereupon proceed upon the warrant in all respects, with like effect, and in the same manner prescribed by law in respect to executions issued against property upon judgments of a court of record, and a sheriff shall be entitled to the same fees for his services in executing the warrant, to be collected in the same manner. An officer or employee of the department of taxation and finance may proceed in any county or counties of this state and shall have all the powers of execution conferred by law upon sheriffs, but shall be entitled to no fee or compensation in excess of actual expenses paid in connection with the execution of the warrant. (g) Taxpayer not a resident.--Where a notice and demand under subsection (b) shall have been given to a taxpayer who is not then a resident, and it appears to the tax commission that it is not practicable to find in this state property of the taxpayer sufficient to pay the entire balance of tax or other amount owing by such taxpayer who is not then a resident, the tax commission may, in accordance with subsection (c), issue a warrant directed to an officer or employee of the department of taxation and finance, a copy of which warrant shall be mailed by certified or registered mail to the taxpayer at his last known address, subject to the rules for mailing provided in subsection (a) of section six hundred eighty-one. Such warrant shall command the officer or employee to proceed in Albany county, and he shall, within five days after receipt of the warrant, file the warrant and obtain a judgment in accordance with this section. Thereupon the tax commission may authorize the institution of any action or proceeding to collect or enforce the judgment in any place and by any procedure that a civil judgment of the supreme court of the state of New York could be collected or enforced. The tax commission may also, in its discretion, designate agents or retain counsel for the purpose of collecting, outside the state of New York, any unpaid taxes, additions to tax, penalties or interest which have been assessed under this article against taxpayers who are not residents of this state, may fix the compensation of such agents and counsel to be paid out of money appropriated or otherwise lawfully available for payment thereof, and may require of them bonds or other security for the faithful performance of their duties, in such form and in such amount as the tax commission shall deem proper and sufficient. (h) Action by state for recovery of taxes.--Action may be brought by the attorney general at the instance of the tax commission in the name of the state to recover the amount of any unpaid taxes, additions to tax, penalties or interest which have been assessed under this article within six years prior to the date the action is commenced. (i) Release of lien.--The tax commission, if it finds that the interests of the state will not thereby be jeopardized, and upon such conditions as it may require, may release any property from the lien of any warrant for unpaid taxes, additions to tax, penalties and interest filed pursuant to this section, and such release may be recorded in the office of any recording officer in which such warrant has been filed.
There is generally no way out of the IRS procedures for federal law under Section 7421:
7421. Prohibition of suits to restrain assessment or collection
How Current is This?
Except as provided in sections 6015 (e), 6212 (a) and (c), 6213 (a), 6225 (b), 6246 (b), 6330 (e)(1), 6331 (i), 6672 (c), 6694 (c), and 7426 (a) and (b)(1), 7429 (b), and 7436, no suit for the purpose of restraining the assessment or collection of any tax shall be maintained in any court by any person, whether or not such person is the person against whom such tax was assessed.
(b) Liability of transferee or fiduciary No suit shall be maintained in any court for the purpose of restraining the assessment or collection (pursuant to the provisions of chapter 71) of-
(1) the amount of the liability, at law or in equity, of a transferee of property of a taxpayer in respect of any internal revenue tax, or
(2) the amount of the liability of a fiduciary under section 3713 (b) of title 31, United States Code in respect of any such tax.
Basically, you have to sue for the return of your money after the actual tax debt has been eliminated, not that you should have to in general... First, you have to eliminate the tax debt, which is what you are working on doing given that there was none, but NY has to assume there was when notices were neglected. This is more or less the price I assume the taxpayer is going to have to pay for failure to respond to notices, given that the government has to assume failure to respond implies guilt, and it proceeded accordingly...
In a case where no return was filed but should have been, you could simply file the return (file a $0.00 return with explanation maybe, not that I think this would help now?)...
Unfortunately, there is no magic answer that I know of, but an educated guess...
Thank you and good luck.