Michael Enright also fumed to the police officers who arrested him that "you allow them to blow up buildings in this country," made an apparent joke about an Arabic greeting, taunted officers and said he had downed a pint of scotch, according to the document.
Enright, 21, pleaded not guilty Wednesday to attempted murder as a hate crime and assault as a hate crime. He is being held without bail in a psychiatric ward.
His lawyer, Lawrence Fisher, declined to comment, but he has said the arts student is struggling with alcoholism and post-traumatic stress disorder after a trip to Afghanistan. While trying to make a documentary film, Enright spent time there with American troops and was haunted by what he saw, Fisher said last week.
Enright, from Brewster in New York's Hudson Valley, got into Sharif's cab, asked the driver whether he was Muslim, uttered an Arabic greeting and made small talk, prosecutors say. The student then offended Sharif with a reference to sexual restrictions Muslims observe during the holy month of Ramadan, according to prosecutors.
Enright told the driver to "consider this a checkpoint" and then said, "I'm going to kill you now," before attacking Sharif with a folding knife, authorities said.
Sharif, who is from Bangladesh, survived. Prosecutors said he narrowly escaped a deadly wound by reacting quickly.
Enright made a series of provocative remarks to police officers who took him to a station house and then to a hospital, according to the document released Wednesday.
He said he was Jewish and officers would "ruin the entire Jewish race by locking me up," and then went on to make a play on words with a common Arabic greeting, the document said.
"Assalamu alaikum - do you like salami and bacon?" the document quoted him as saying. The Arabic phrase means "peace be upon you."
Enright also asked officers "What ya going to do? Beat me up?," called one "a stupid broad" and branded an officer a coward because "you weren't over there," the document said.
Finally, Enright said, "I am a patriot, and I want representation," according to the document.
When arrested, Enright was carrying an empty bottle of scotch, as well as notebooks that described his experiences in Afghanistan, police said.
If convicted, Enright could face up to 25 years in prison.
The case added to the tense atmosphere surrounding debate over a planned Islamic center and mosque two blocks from ground zero, a discussion that has raised questions about Muslims' acceptance in American society nine years after the Sept. 11 terror attacks.
Critics say a mosque has no place occupying a building so near the site where Muslim extremists killed thousands. Supporters say the project is meant to promote interfaith understanding and would stand as a symbol of tolerance.