Michael Enright also suffers from chronic alcoholism and is in need of treatment, which he would get if he were allowed out on $250,000 bail, said attorney Lawrence Fisher.
The 21-year-old Enright is accused of telling the driver to "consider this a checkpoint" before stabbing him last month.
Judge Richard Carruthers said he would wait to decide whether to grant bail until Enright's arraignment Sept. 22 on charges of attempted murder and assault, both as hate crimes. Carruthers ordered him held until then.
Enright, his blond hair disheveled and wearing a loose mock-turtleneck, did not speak during the brief hearing Monday at Manhattan state Supreme Court. He was portrayed as an eager, caring young man; a former Boy Scout and baby sitter; someone with no criminal history who was troubled by haunting images. He lived in suburban Brewster with his parents, who attended the hearing but didn't speak.
"This is not a hate crime in our view," Fisher told the judge.
Fisher said Enright, a would-be senior film student at the School of Visual Arts, traveled to Afghanistan last spring to work on a documentary for a class project after hearing about a friend who had enlisted in the Marine Corps. He was briefly embedded with troops, and his time there disturbed him deeply.
"He wanted to film a documentary that people could ... really know what soldiers were going through in Afghanistan," Fisher said.
When arrested, a drunken Enright was carrying two notebooks that described his experiences there, along with an empty bottle of scotch, police have said.
The chairman of the school's film department, Reeves Lehmann, attended Monday's hearing and told reporters outside that, as a former Marine who fought in Vietnam, he was proud of Enright's decision to travel there.
"The fact that he even would risk his life to tell this story" made him proud, Lehmann said.
Lehmann defended Enright, saying he was not a criminal full of hate. The school would take him back if he were allowed to leave jail, Lehmann said.
But prosecutors painted a very different picture. Assistant District Attorney James Zaleta, arguing against bail, said Enright was trying to kill driver Ahmed H. Sharif, and would have succeeded if the Sharif hadn't reacted in the nick of time.
"If the driver had not moved that tiny little bit, doctors said he would've been dead at the scene," Zaleta said.
Enright got in the taxi Aug. 24, asked the driver if he was Muslim, and uttered an Arabic greeting and made small talk, Zaleta said. He then offended Sharif by making references to sexual restrictions on Muslims during the holy month of Ramadan, Zaleta said.
He made the "checkpoint" remark and said, "I'm going to kill you now," before attacking Sharif with a folding knife, authorities said. Later, when approached by the cops, Enright claimed he was trying to defend himself and that Sharif had been trying to rob him.
Sharif, who is from Bangladesh, was wounded in the face and neck but survived. He has said he has no doubt the attack was fueled by anti-Muslim bias.
Enright's arrest came amid an emotional, worldwide discussion of the planned Islamic center and mosque two blocks from the World Trade Center site. Supporters see the mosque as a monument to religious freedom; opponents call it an affront to the memory of the nearly 2,800 people killed by Muslim extremists in the 2001 terror attacks.