The 15-year-olds were taken to hospital after violence flared in Doncaster Road, Conisbrough, at 5.40pm on Saturday.
South Yorkshire Police said groups of students from different schools organised a fight and innocent members of the public were set upon in a case of mistaken identity.
Inspector Dan McKnight said: "Our enquiries have now revealed that the two 15-year-old boys who were injured in Saturday evening’s incident were not involved in the disorder and were unfortunately mistakenly targeted.
"This just highlights how dangerous this group’s behaviour was - two innocent parties were wrongly targeted, chased and assaulted.
"Thankfully the pair only suffered minor injuries but that’s not the point. Those involved on Saturday evening clearly intended to cause harm and injury to others and this is completely unacceptable.
"We are working with the victims to provide support, as well as continuing to scour for CCTV footage and liaising with local schools.
"We appreciate the support we have already had from the local community as we investigate this matter and continue to urge anyone with information about the disorder or those involved to contact police."
Anyone with information should call South Yorkshire Police on 101 quoting incident number 844 of January 20.