The gruesome killing took place in June, with court documents seen by Swedish media outlining the prosecution's case ahead of the teenager's trial, which is set to get under way later on Friday.
The boy, who is from North Africa and had been sleeping rough in the west Swedish city, is accused of murdering the 54-year-old victim in the flat he shared with his partner.
Police managed to recover a video from the boy's mobile, which shows him shouting and swearing at the man and insulting his sexuality.
"He has mistreated him and taken his life just because he was gay and dressed as a woman," prosecutor Lotta Nielsen was quoted as saying by Swedish tabloid GT.
"It is a hate crime, it is a mindless assault and it is a brutal murder," she added.
Neilsen also wrote that the man had been found with a shirt tied around his neck and wrists and a dead snake draped around his neck.
The court documents show that the victim's partner of many years did not think the Swede had a history of cross-dressing.
"It is as if they dressed him up to mock him or something," he said in a police interview.
Story continues below…
The teenager denies murder and says that he was acting in self defence.
A 19-year-old, who admits being with the younger teenager at the time of the attack, has denied being an accomplice, but has been charged with protecting the alleged criminal.