Officials said Corey Brooks was playing in the shallow surf on Hutchinson Island when he ran out of the water crying.
The boy was on the beach with his babysitter and her children at the time of the incident. She said he thought someone had pinched him.
Corey received 125 stitches to close the eight-inch wound on his right calf.
People were ordered out of the water for a couple of hours after the attack.
According to the International Shark Attack files, there were 76 unprovoked shark attacks last year in the U.S.
Thirty-seven of those took place along the Florida Coast.