Tuesday's decision means David Tarloff will be sent to a state hospital for treatment until doctors find he has improved enough to stand trial - if they ever do.
The ruling came after two psychiatrists found him incompetent, and prosecutors said he refused to cooperate with a third exam.
Tarloff is charged with killing psychologist Kathryn Faughey (FAW'-hee) in 2008 as part of a robbery plot targeting her officemate. He had planned an insanity defense.
Jury selection was under way last month until Tarloff's behavior raised questions about his mental state.