ALBANY, N.Y.—New York state lawmakers abandoned a bill to legalize and regulate recreational marijuana for adults and said they would instead focus on further decriminalizing the drug.

The shift Wednesday was a blow to legalization advocates, who had hoped New York would follow Illinois in becoming the second state to set up a regulated marijuana market by legislative action. Ten states allow recreational marijuana, including California and Massachusetts. Lawmakers in New Jersey were unable to pass a bill this year and are...