The boys, relatives of the girl, were arrested following a complaint by her mother, Police Commissioner, Warangal City, Vishwanath Ravinder told reporters.
The girl was raped by the boys about a month ago, according to the complaint.
The incident came to light when the girl's mother found scars in her genitals when she was giving her a bath.
She took the girl to a doctor, who found that she was raped, police said.
The boys had allegedly threatened the girl not to reveal anything about the incident, police said.
The incident comes amid outrage over the rape incidents in Kathua in Jammu and Kashmir and Unnao in Uttar Pradesh.
In Kathua, an eight-year-old girl was raped and killed, while in Unnao a minor girl has alleged that she was raped by a BJP MLA.