The driver told police that when he answered yes, Michael Enright pulled out a folding hand tool, reached into the front seat and slashed him.
Enright was arrested Tuesday night, said Deputy Inspector Kim Royster, a New York Police Department spokeswoman.
The driver was treated for cuts to the throat, upper lip, forearm and thumb, Royster said.
The 21-year-old Enright, of suburban Brewster, N.Y., was arraigned in a Manhattan court Wednesday on charges of attempted murder as a hate crime, assault as a hate crime and weapons possession. He is being held without bail.
Manhattan prosecutors say Enright spoke to the cabbie in Arabic and then said, "Consider this a checkpoint," before attacking him Tuesday night on the Lower East Side.
The New York Taxi Workers Alliance identified the victim as Ahmed H. Sharif, a yellow cab driver for 15 years. In a news release, the labor group noted that the incident occurred amid tension over plans for a new Islamic cultural center and mosque in Lower Manhattan near ground zero.
"I feel very sad," the release quoted Sharif as saying. In the current climate, he added, "All drivers should be more careful."
Police said the mosque wasn't mentioned during the incident that began at about 6 p.m. Tuesday when Enright hailed the cab at East 24th Street and Second Avenue.
Enright was carrying a tool called a Leatherman and, after the exchange about the driver being Muslim, turned it on him, police said. The driver fended him off, then tried to lock him inside the cab and drive to a police station, they said.
The suspect jumped out a rear window at East 40th Street and Third Avenue, police said. An officer there noticed the commotion, found Enright slumped on the sidewalk and arrested him.
A case for the tool was found inside the cab, but the tool itself was missing, police said.
Enright has apparently volunteered for a group that promotes interfaith dialogue and and has supported the controversial proposed mosque.
Rev. Robert Chase of Intersections International says he believes that Enright has volunteered for the group, based on the police saying Enright is from Brewster, and other details. A Facebook profile for a man named Michael Enright lists the same hometown and employment at Intersections International.
"We've been working very hard to build bridges between folks from different religions and cultures. This is really shocking and sad for us," Chase said Wednesday. "If these allegations are true, we of course deplore this violence especially anything perpetrated against anyone simply because he or she is Muslim."
Chase said Enright, a student at the School of Visual Arts, has been volunteering for the group for about a year on a project that involved veterans.
He did a video project that sent him to Afghanistan for about six weeks this spring to document the life of an average soldier, Chase said. He was embedded with a unit there.
Intersections has come out in support of the mosque project, but Chase said Enright wasn't involved in that.