"We check in various areas that people who might be up to no good, might be using for no good," Amherst Police Capt. Scott Chamberlin told WGRZ-TV.
Police and firefighters in Hazmat suits were lowered into the sewer and brought up aerosol spray cans, plastic soda bottles, various chemicals, jars of clear liquid and suspected methamphetamine.
Investigators said the laboratory apparatus had been set up atop wooden pallets to keep the suspected meth-making equipment out of the water.
"If this had plugged up the sewer, it would have caused problems," James J. Zymanek, Amherst's director of emergency services, told The Buffalo News.
The store remained open during the investigation. Police said they are examining Walmart security camera footage in an attempt to identify a suspect or suspects.
"It happens all over the country. All over the state. It's out of the ordinary for Amherst. Has it happened before? Yes," Chamberlin said.