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
Pics: Prabhas, Tamannaah Bhatia at 'Baahubali 2' first look launch at MAMI
'Ae Dil Hai Mushkil' photos: Aishwarya, Anushka, Karan get candid at MAMI
Photos: Huma Qureshi, Neha Dhupia and other celebs at MAMI
Photos: Amy Jackson, Daisy Shah at Mumbai airport
Photos: Sridevi, Irrfan and other celebs at 'Mughal-e-Azam' screening