The baby was left for a number of hours after the parent "went to work, forgetting to leave the baby in the usual childcare facility", Neuchatel prosecutor Marc Remy said in a statement.
"It was not until the end of the working day when they went to pick up their child, that they realised the tragedy that had occurred," he said.
The accident happened in the town of La Chaux-de-Fonds, in the west of the country.