The indigenous girl was buried in the Xingu National Park in Mato Grosso state, which is home to many of Brazil’s tribes, not long after her birth on Tuesday.
Officers dug the naked baby out of the sand, her umbilical cord still attached.
The baby’s great-grandmother, who is a member of the Kamayura tribe, has been detained.
State prosecutor Paulo Roberto do Prado said: “We are investigating whether it was an attempted infanticide or if she thought the baby was dead.”
The baby is in a neonatal intensive care unit and is “doing well”, he added.
The baby’s family have said she fell on her head after her mother gave birth in a bathroom.
But, with the mother being just 15 and the father refusing to recognise the little girl, police have said there are suspicions that they had “tried to kill the newborn”.
The family was interviewed by police, accompanied by an anthropologist, psychologist and representatives of Funai – the government body in charge of indigenous affairs.
Mr do Prado said this was to establish whether the case was linked to indigenous customs.