Wendy Sanchez, 21, was sentenced to six months in jail in exchange for her guilty plea.
In May, a neighbor of Sanchez discovered the baby girl lying in her backyard. The child had been there for several days.
Prosecutors say Sanchez attempted to get an abortion but was turned down because she was too far along in her pregnancy.
The baby survived the ordeal and has since been placed with a foster family.