The accident occurred near a construction site in the state of Minas Gerais. The six-year-old dog named Titan, who the family says is usually calm and loving, pounced on the boy.
"I grabbed him by the neck and bit in," said the child, who escaped with only an arm injury and a broken tooth.
Nearby construction workers who heard screams, and ran over to pull the dog off, said the boy probably saved his own life.
Pit bulls are commonly used as guard dogs in Brazil's major cities, amid rising crime rates. Cases of owners being attacked by their pets have also increased.