When mother hamsters are sick, their space is disturbed or they feel stressed or endangered, they may panic and kill and eat their babies. Keep your newborn hammies safe and their mother happy and you increase the odds for breeding success.
Plan the Breeding Cycle
Carefully planning your hamster's breeding cycle will yield better reproduction results than allowing hamsters the chance to breed indiscriminately. Don't house males and females together long term, only put them together for breeding purposes. Once you think your female is pregnant, give her a private cage in a quiet area to build a nest and prepare for her babies. This reduces potential stressors created by cage mates that could make her fearful and prone to hurting her babies.
Only Breed Healthy Females
Female hamsters are best bred in their first year and can typically have about seven healthy litters in a lifetime. Breeding an older or sick hamster or making her have back-to-back litters can create stress. Your mother hammie might be prompted to kill and eat her babies if she doesn't think she can care for them.
Create a Serene Environment
Mother hamsters sometimes hide newborn babies in their cheek pouches as a way to keep them safe from perceived harm. Babies can suffocate or get eaten during this period. Make sure your mother hamster doesn't have any fears to contend with by leaving her and her nest of babies undisturbed for the first several weeks after birth.
Feed Her Well
Place food on the floor near the baby nest so the mother has easy access. She'll need extra nutrition to nurse her babies. Making sure she is well-fed and hydrated will reduce the potential for killing and eating babies.