Frank Andriani, 24, of Linden Street, is charged with attempted robbery, criminal possession of a controlled substance and criminal possession of a weapon, police said.
Andriani entered the convenience store, at 1275 Front St., shortly after 1 a.m., wearing a dark hooded sweatshirt and an orange bandanna covering his face, First Squad detectives said.
Authorities said Andriani approached the clerk, a 24-year-old man, and showed a folding knife and demanded cash from the register.
But, moments later, Andriani became fearful and fled from the store without the money, police said. A police spokesman said it's unclear what prompted Andriani to abandon the robbery.
The clerk called police and was able to describe the suspect. Officers from the First Precinct in Baldwin found the suspect a short time later driving a 2007 Acura south on Laclede Avenue and placed him into custody, police said.
Inside the car's center console, police said they found a Suboxone pill, a narcotic used for the treatment of opioid dependence.
Andriani will be arraigned later Saturday in First District Court in Hempstead.