Gov. Andrew Cuomo signed the legislation, saying the drugs have become an alternative to methamphetamine with "disastrous" results that include violent reactions and hospitalizations.
They contain ingredients known as Mephedrone and MDPV.
Sponsors say there are similar bans in Britain, Australia and Canada, as well as Florida, Louisiana and North Dakota.
New York's ban on selling, possessing, making or distributing the drug takes effect in 30 days.
Cuomo also says he signed legislation banning the sale of shisha, a flavored tobacco, as well as pipes, water pipes, hookahs and cigarette rolling papers to minors.