Khawaja's case is the first being heard under new terrorism provisions of Canada's criminal code.
He faces seven charges under new laws introduced as part of the 2001 Anti-Terrorism Act.
Khawaja had argued that he had been targeted because of his Muslim religion, but when that part of the law's definition was struck down by the Ontario court, he said, the law had been gutted and that he should be allowed to go free.
The government had argued that Khawaja should follow the normal route of appeals in provincial courts rather than seeking a shortcut to the federal supreme court.
Freedom of expression
In October, a Canadian judge struck down a portion of the act that defines terrorism, saying it infringed on constitutional "freedoms of conscience and religion; thought, belief, opinion and expression and of association".
But instead of releasing Khawaja, the judge granted the government a year to amend the act while allowing the prosecution for aiding a terrorist group and facilitating terrorist activity to continue.