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
Spotted: Alia Bhatt, Ranveer Singh, Neha Dhupia in Bandra
Photos: Salman Khan returns from Jodhpur to Mumbai
15 'peach' perfect photos of Priyanka Chopra at People's Choice Awards 2017
62 going on 16: These photos of Rekha prove she is 'forever young'
Photos: Tennis legend Andre Agassi meets Rahul Dravid in Mumbai