A teenage mother left her baby in a plastic bag under a bush for three days while she visited a friend on a weekend break, say prosecutors.
Harriette Hoyt, 17, is in custody in Elmira, New York, facing an attempted murder charge, police said.
The eight-month-old girl, who was found with maggots crawling on her and sunburn, survived her ordeal.
Ms Hoyt allegedly travelled from Sayre, Pennsylvania, on Saturday morning and abandoned the infant around noon.
The baby, whose name was not released, showed no other signs of physical abuse, according to Chemung County District Attorney Weeden Wetmore.
She was taken to hospital and is in a stable condition, said officials.
Kayla and Karen Seals, who are sisters, discovered the child in a white plastic bag on Tuesday afternoon.
“My sister came out off the porch and went to the side to the backyard of my neighbour’s house with a stick, thinking it was a dog,” Karen told local television station WENY.
“Her legs were just dangling in the bag,” Kayla added. “Her head was in the bag. Her whole head was covered all the way down.”
The two called 911 and cleaned the child, who was wearing a soiled nappy with parts of her body covered in a rash.
“She had maggots on her neck, itching, just crawling on her,” Kayla Seals told WENY.
“She had scars on her chest down… her legs was burnt, her arms were burnt, she couldn’t breathe. She was trying to gasp for air.”
Elmira police Sgt William Solt described the two women as “heroes”.
New York allows parents to leave a newborn in a safe place such as a hospital or fire station without fear of facing legal prosecution, but it is not thought the law would cover the defendant in this case.
Ms Hoyt was being held on $250,000 bail (£192,000) and is due to appear in court next Monday.