Jacole Prince, 30, pleaded guilty to charges of abuse, assault and endangering the welfare of a child. As part of her plea agreement, she will serve no more than 20 years in prison.
The Missouri Department of Family Services found the 10-year-old girl, identified as "L.P.", severely malnourished and living in her own feces in the summer of 2012 after receiving a tip.
Authorities said she weighed about a third of what a child her age should weigh.
The records show L.P. told social workers she believed she had been locked in the closet on and off since 2007. She said she was not allowed food and hadn't celebrated her birthday or Christmas in several years.
The closet was rigged where it could only be opened from the outside.
At the time she was found, Prince and her two younger daughters lived in the apartment with her boyfriend.
Prince's sentencing hearing is scheduled for April 25 at 1:30 p.m.