Police arrested 22-year-old Diana Ochoa on suspicion of child cruelty.
Witnesses told police that Ochoa stripped the clothes off herself and her niece on Wednesday, then beat the child while walking along a busy street.
Police say Ochoa then left the bloodied little girl in front of an apartment complex and ran naked in and out of traffic. Investigators found the child at the Foxwood Apartments near Fresno and Palo Alto around 4 p.m. Wednesday afternoon.
Investigators say that prior to stripping naked, the woman and child had entered a business, where Ochoa tried to give the toddler away.
Police could not confirm whether drugs or mental health were factors in the case.
The child remains hospitalized in stable condition.
Ochoa was taken to the hospital for medical evaluation and later arrested.
The Associated Press contributed to this story.