The toddler was killed Wednesday after he walked past the fenced-in front yard of a house, Federal District special prosecutor Oscar Morales de Oca said.
The pitbull bit the boy on the leg and dragged him into the yard, where other dogs attacked and killed him, officials said.
The boy's mother tried to pull him away from the animals but failed.
The dogs' owner, identified as 48-year-old Maria Estela Flores Perez, was arrested and will be investigated for manslaughter, officials said.
The boy's body was taken to the coroner's office for an autopsy.
Wild dogs attacked and killed four people in January at a Mexico City nature reserve
Bollywood celebs show you colours for Navratri 2017
Photos: Kareena Kapoor Khan, Kangana Ranaut at the Mumbai airport
Birthday special: Chris Gayle and his multiple records in cricket
In Pictures: 17 dreaded on-screen villains of Bollywood
'Ramayan' director's great granddaughter Sakshi's hottest photos