The 29-year-old Frenchman, who was living with the victims at the hostel and had been in Australia on a temporary visa for about a year, is accused of carrying out the knife attack in Queensland.
The suspect did not have any known links to the dreaded Islamic State group and appeared to have acted alone, Queensland Police Deputy Commissioner Steve Gollschewski said, adding that police were trying to determine whether the man had been motivated by extremism.
Mia Ayliffe-Chung was killed in the attack that took place in front of a crowd at Shelley's Backpackers in Home Hill, South of Townsville, after 11 pm on Tuesday night. A dog from the hostel was also killed.
Two men who suffered injuries include a 30-year-old Briton, who is said to be in a critical condition.
The suspect is in custody in a hospital and is yet to be charged over the knife attack in Queensland, media reported.
"Investigators will also consider whether mental health or drug misuse factors are involved in this incident," he said.
Gollschewski said the accused used the Arabic phrase "Allahu Akbar" both during the attack and his arrest.
"While this information will be factored into the investigation we are not ruling out any motivations at this stage, whether they be political or criminal," he said.
"We're working closely with our partner agencies to make sure if there is any indication that it has an extremist slant, or this person had been radicalised, we can discover that," he said.
The police were treating the attack as a homicide, rather than a terrorism-related incident, Gollschewski said.