A court heard the teenager may have used a hammer or brick on his younger victim during the incident in west Leeds.
The 15-year-old, who cannot be identified, was given an extended sentence totalling six years over the attack.
The incident happened on February 18 this year after the 15-year-old had been drinking whisky, smoking cannabis and taking other drugs. The teen wrongly believed the 12-year-old had contacted police and blamed him for damage to a bus stop.
After the attack the 15-year-old told family members he thought he had killed the boy.
Leeds Crown Court heard the youngster was found with “dreadful” facial injuries and was struggling to breathe. His injuries included fractures to both sides of his jaw and to his cheek bones.
The boy is still receiving medical treatment for his injuries but surgeons have said he is making an “excellent” recovery. The 15-year-old pleaded guilty to causing grievous bodily harm with intent. He was made the subject of an extended sentence after being assessed as posing a risk to members of the public in the future.
The teenager will have to spend four years in custody followed by a further two years on licence.
After the case, Det Chief Insp Lisa Atkinson, Head of Leeds District Reactive CID, said: “This was a truly brutal assault which left the 12-year-old victim with some very serious facial injuries from which he is still recovering. The attack had a real impact on the local community and the violence used in the assault could easily have resulted in even worse, possibly fatal consequences.