Emanuel Lutchman was charged with attempting to provide material support to the IS group, the Justice Department said -- a charge that carries a maximum penalty of 20 years in prison.
"This New Year's Eve prosecution underscores the threat of ISIL even in upstate New York, but demonstrates our determination to immediately stop any who would cause harm in its name," said federal prosecutor William Hochul.
Authorities said that Lutchman, claiming to have received direction from an IS operative abroad, intended to "commit an armed attack against civilians at a restaurant/bar located in the Rochester, New York, area today, New Year's Eve."
His plot was to be carried out "on behalf of ISIL and in furtherance of his plan to join ISIL overseas," the statement said, referring to the Islamic State group by an acronym commonly used by the US government.
More From This Section
Rochester is located in the western part of New York state on Lake Ontario, more than 330 miles (530 kilometers) northwest of Manhattan.
Authorities in the West are on edge as 2016 arrives, especially in the wake of the Paris attacks in November that killed 130 people, and a deadly December 2 gun attack in San Bernardino, California by a Muslim couple believed to have been inspired by IS ideology.
Both Paris and Brussels canceled New Year's Eve fireworks displays as soldiers and police ramped up security in European capitals over perceived terror threats.