Weverton Silva fell from a tree and landed on the 2ft (60cm) metal spike.
Doctor Rodrigo Chicralla told Brazil's Globo TV that it was a miracle that the youngster lived.
The bar that pierced him during last week's accident in Rio de Janeiro state barely missed an artery and his heart.
The boy was on a branch of a guava tree when it broke. He fell on to a wall below from which the bar was jutting.
Firefighters took Weverton to the hospital, where it took five hours to remove the bar in one piece from the boy's body.
Doctors sent him home on Friday.
Dr Chicralla told the TV station, "It (the bar) had passed through basic arterial routes, and to have something like this happen, it is difficult to arrive at a hospital with such a situation. I think it was just God (that meant Silva survived)."
SHI/SHI