Astro Awani television and and The Star daily reported that the assault took place in the northern state of Kelantan on May 20 when the girl met a girlfriend and was lured to an empty hut reported to be a local drug haunt.
The men took turns to rape her for hours. Police were also investigating whether her 17-year-old friend was also raped.
The alleged attack, one of several brutal caes this week underscoring the violence to which women are being subjected across Asia, sparked outrage among women's groups. Politicians from a Muslim party running the region said their proposal to introduce Islamic hudud law, with harsh penalties, would deter offenders.
State and federal police officers either declined comment or could not be immediately reached.
Media accounts, quoting information from district police chief Azham Otham, said 38 men were involved.
Several of those detained had tested positive for amphetamine, the reports said. The New Straits Times said a man and his two teenage sons were among those detained.
Police said action could have been taken had villagers reported the addicts presence.
"It is very disturbing to me that no one in the village was even suspicious when the closest neighbour was a mere 20 metres away," police chief Azham told The Star.
Almost 3,000 rapes were reported to the police in 2012, of which 52 percent involved girls aged 16 and below, according to police statistics.
Convicted rapists face up to 30 years in prison and whipping, but many on Internet sites wanted stricter punishment.
"We are seeing a prevalence in rape cases because boys are raised in an environment where they think it is okay to use violence," Suri Kempe of Sisters in Islam told Reuters.
Awareness of rape in Asia was heightened by the fatal gang rape of a physiotherapy student on an Indian bus in 2012.
Several grisly attacks on women took place this week.
In the Pakistan city of Lahore, a pregnant woman was bludgeoned to death by her family in front of a top court for marrying against the wishes of her parents.
And in India's Uttar Pradesh state, two teenage cousins from a low caste were gang-raped and then hanged from a tree.