The 17-year-old, a Kurdish Iranian, was waiting at a bus stop with two friends in Croydon, south-east London, when he was set upon by around eight youths.
They asked him where he was from, and when he told them he was an asylum seeker they chased after him and launched their attack.
Scotland Yard said the boy is in a critical condition in hospital and fighting for his life, while his two friends escaped with minor injuries.
Chief Superintendent Jeff Boothe, Croydon’s borough commander, told reporters the teenager had been a victim of “a frenzied attack by a large number of people”.
He was kicked repeatedly while on the floor, “by all accounts with members of the public asking them (his attackers) to stop”.
They only did so when they heard sounds of police sirens approaching, Mr Boothe said.
The attack has prompted a wave of condemnation, with Tory minister Gavin Barwell, Croydon Central’s MP, describing the attackers as “scum”.
He told the Press Association: “I think most people in Croydon will be as appalled as I am that what appears to have happened is a young man who came to this country seeking sanctuary has apparently been targeted because of his ethnic background.
“It’s an appalling crime and I hope the people responsible are caught quickly and receive the full force of British justice.”
He said Croydon, a very diverse community, generally had “very good relations between people of different backgrounds”.
“This is completely out of character but that is no comfort to the individual who is fighting for his life now,” he added.
Shadow home secretary Diane Abbott also denounced the incident and suggested the Conservatives had failed to get to grips with so-called hate crimes.
She said: “Sadly this is not an isolated incident but part of a sustained increase in hate crimes that this Tory Government is yet to offer any effective response to.
“With right-wing politicians across the world scapegoating migrants, refugees and others for their economic problems, we are seeing a deeply worrying rise in the politics of hate.
“We must make clear that there is no place for anti-foreigner myths, racism and hate in our society.”
The attack happened in Shrublands Avenue at 11.40pm on Friday. No arrests have been made.
Detective Sergeant Kris Blamires said: “At this early stage it is believed that about eight suspects approached the victim as he waited at a bus stop with two friends outside The Goat public house in the Shrublands.
“It is understood that the suspects asked the victim where he was from, and when they established that he was an asylum seeker they chased him and launched a brutal attack.
“He has sustained critical head and facial injuries as a result of this attack, which included repeated blows to the head by a large group of attackers.
“A number of people came to the aid of the victim as he lay unconscious and injured following the assault.
“The suspects are believed to have made off in the direction of the Goat Pub, Broom Road, following the attack.
“All communities stand together against hate and we would ask anyone with any information to come forward immediately.”
Police are urging those who helped the boy and anyone who witnessed the attack to get in touch, calling police on 101 or Crimestoppers on 0800 555 111.