Chiheb Esseghaier made the comments during a hearing on five charges, including conspiracy to commit murder, The Globe and Mail reported.
Esseghaier, 30, of Montreal, and Raed Jaser, 35, of Toronto are accused of plotting to derail a Via Rail Canada passenger train between New York and Toronto.
When addressed by the justice of the peace, Esseghaier calmly said he did not recognize Canadian laws because "this criminal code is not [a] holy book. It's just written by set of creations and the creations they're not perfect because only the creator is perfect."
The judge thanked him for the comments, and added, "It doesn't matter in this court."
Esseghaier was held without bond pending a May 23 court hearing.
A native of Tunisia, Esseghaier moved to Quebec in 2008 for work as a graduate researcher at the University of Sherbrooke.
He was arrested Monday at a restaurant inside Montreal's central railway station and Jaser was taken into custody in Toronto.
Millions of Getty images now available for free via embed tool
Aaron Carter is still in love with Hilary Duff