Police in Chengdu city has confirmed the detention and the murder which took place last month.
The victim, identified by his surname Lu, was a freshman in Sichuan Normal University.
He was stabbed over 50 times and beheaded by his roommate, identified by the surname Teng, around midnight, state-run Xinhua news agency quoted Lu's relative as saying.
Lu, 20, allegedly got into an altercation with Teng on March 26 over Lu's singing in the dormitory.
More From This Section
Teng left the campus on March 27, and returned to his dormitory late at night, and asked Lu to accompany him to a nearby study room.
Teng later returned to the dormitory, asking the other roommates to call the police and went back to the study room and locked the door.
Teng was arrested at the school.
Campus murders resulting from dormitory disagreements in recent years have raised concerns about students' psychological state and interpersonal relationships.
In 2004, Ma Jiajue, 23, a biochemistry student at southwest China's Yunnan University, killed four roommates after what were described as "trivial squabbles".