Police said the 21-year-old woman had befriended the boy on Facebook and had visited his house at Ramapuram near Pala on Saturday night.
The duo locked themselves inside his room, refused to come out, despite pleas from the boy's parents, relatives, neighbours and police and even threatened suicide when the family tried to break open the door, they said.
Police finally broke open the door and the woman was arrested.
A local court has remanded the woman to judicial custody.