The judge said Thursday that prosecutors failed to provide evidence that 26-year-old Chelsea Becker consumed drugs, knowing it could kill her child.
Becker's attorneys have argued that California's homicide law does not apply to pregnant women.
Prosecutors said the case about stopping a woman who has repeatedly abused narcotics while pregnant, resulting in two other babies who tested positive for meth at birth.
The coroner's report listed toxic levels of meth as the baby's cause of death.