Police in Homestead say the boy, Tim Perez, threw himself over his 4-year-old brother and a 4-year-old friend when they were running away from the dog.
Authorities say the two younger children then crawled under a vehicle and the dog started attacking Tim.
He received severe bites to the head, shoulder and arm.
The boy's father, who did not want to be identified, saw what was happening and came to the rescue.
"I just grabbed the shovel, the steel shovel, and I just hit the dog," he said.
Officials say what happens to the dog is up to animal control services, which took the dog away, and whether the owner will be cited.
The boy is expected to be OK.