The court heard how one of the thrusts was so forceful the knife went completely through Mr Pan's neck.
Armstrong drove home without calling emergency services.
Once there he tried to kill himself by slashing his own wrists and stabbing himself in the stomach, before driving his car into a lamp post.
Forensic psychiatrist Dr James Cavney said Armstrong probably knew he was killing something but was convinced it was a demon.
He said the defendant's moral compass was upset by his obsession with the fantasy game Magic: The Gathering.
Armstrong told health professionals Mr Pan had beaten him in the game and for weeks he heard his voice taunting him everywhere he went.
He even went to the extent of approaching the Mormon Church to consult it over whether killing a demon was morally wrong.
Magic: The Gathering is a popular online and collectable card fantasy game. Photo / Supplied
Justice Lang said the voices in Armstrong's head had caused several strange acts over the weeks leading up to the killing.
Armstrong had smashed various items for no apparent reason and had killed his own tropical fish - motivated by his "auditory hallucinations".
He also admitted he had driven to Mr Pan's house with a knife four weeks before the slaying but had been able to persuade himself not to go through with the stabbing.
Armstrong then planned to go to Australia to try to subdue the voices but never followed through with it.
Justice Lang said he had "no hesitation" in finding him not guilty by way of insanity and said Armstrong would be released only when the Minister of Health was convinced he was no longer a risk to the community.
Armstrong's family declined to comment outside court.
A police officer at the hearing will be in touch with Mr Pan's family in Taiwan to inform them of the result.