The child was admitted to the MKCG Medical College and Hospital, police said.
The incident took place two days ago, but it came to light yesterday when locals informed the police.
The girl's mother said she and her husband had left their daughter at their friend's house for the summer vacation so that she could play with his baby.
The accused was arrested yesterday.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.