The child, belonging to a migrant Tamil family, was sleeping with her mother near a hospital on Monday night but next morning she was found missing, they said.
"She had high fever and was found with ants crawling all over her body," eye-witnesses said.
Police were immediately alerted and the child rushed to a hospital at Tirur in Malappuram district and later shifted to Kozhikode Medical College Hospital where she underwent two surgeries, they said.
Her condition is now stable, doctors treating her said.
More From This Section
A case has been registered and at least 14 persons have been taken into custody and are being questioned, police said.
The Kerala Women's Commission Chairperson K C Rosakutty visited the girl and her mother at the hospital this morning and later told reporters that all care would be given to the child who would be under their protection.
The mother told police that the baby was sleeping by her side on Monday night. But next day morning, she was missing and a complaint was filed.