South Yorkshire Police said officers were alerted to a 'large scale disturbance' in Conisbrough on Saturday night.
Two groups of youths were said to have been involved.
No other details have been released, but an aunt of one of the victims, said the boys were 'set on by several youths' armed with cricket bats and what is believed to have been a knife.
She said her nephew was stabbed.
She said: "This was completely unprovoked. Can any witnesses please come forward. We're not in gangland New York and two young lads should be able to cycle around their town without being attacked."
A South Yorkshire Police spokesman said: "Two youths were injured and five detained by attending officers.
"An investigation is ongoing."
Anyone with information should call South Yorkshire Police on 101, quoting incident 844 of January 20.