The younger girl was found with life-threatening injuries near an address in Alness Drive, in the Woodthorpe area of the city.
She was taken to hospital but died a short time later, North Yorkshire Police said.
The teenager remains in police custody and is being questioned by officers, the force added.
A spokesman said officers found the seven-year-old after police were called at about 16:30 GMT.
The investigation into the circumstances surrounding the girl's death continues, he added.
Earlier, the York City and East policing team posted a message about the incident.
In a tweet, they said: "Difficult late shift for all York staff with tragic death of a seven-year-old. Thoughts go out to family members."

A petrol bomb was thrown at a house at Thornhill Crescent, at about 02:45 BST on Sunday. A man and a woman in the property were not injured.
A window was broken at a property at Cloona Manor just before 00:45 BST and a device was thrown at the front door. It caused minor damage.
It is unclear if anyone was in that house at the time.
A second unexploded petrol bomb was found in the driveway of the house at Cloona Manor. It has been taken away for forensic examination.
The police said they were also investigating  a report of arson at the same property in Thornhill Crescent  at about the same time as the petrol bomb attack.
It was reported that a silver Vauxhall Zafira was set alight in the area.
No-one is believed to have been injured during the arson attack, but the vehicle was extensively damaged.
Ch Insp John Wilson said:  "Enquiries are continuing, but at this stage police are investigating a possible link between an earlier incident that occurred at the Cloona Manor area and the incidents at Thornhill Crescent."
Speaking about the Cloona Manor attack, Sinn FÃ©in MLA Jennifer McCann said: "Attacks like this can lead to serious injury or death and it's very worrying that anyone targeted this elderly man's home in this way.
"If anyone has information on who was behind this attack, then they should give it to the police immediately."
SDLP Lisburn councillor Brian Heading said the Cloona Manor attack was "reckless and dangerous".
"Anybody who throws petrol bombs at a home is attempting murder. There can be no justification of that," he said.
"I'm urging those who carried out the deed to think long and hard and ask themselves what they have achieved and turn themselves into the police."
Police have appealed for witnesses.
A 15-year-old girl has been arrested after the death of a seven-year-old girl in York, police have said.
[NEXT_CONCEPT]
Two petrol bombings and an arson attack in Dunmurry near Belfast may be linked, the police have said.