The shooting suspect, Quentin Patrick, was in custody, a jail official said. Patrick, 22, has been charged with murder and three counts of assault and battery with intent to kill.
The jail official said she didn't know whether Patrick had an attorney and his telephone number was unpublished.
The family was headed home from a city-sponsored event in Sumter, South Carolina, when they decided to stop at a few homes, Sumter Police Chief Patty Patterson said. The father and his four children approached a home with a porch light on about 8:30 p.m. EDT while their mother waited nearby in a vehicle.
As the family was at the door, they thought they heard fireworks. The 12-year-old boy, his father and brother were all hit by the gunfire. The boy died at a hospital, Coroner Verna Moore said. The other two children were not hurt.
The boy's father and brother were taken to a hospital with non-life-threatening injuries. Authorities have not released the identity of the family.
Patterson also would not release any more details about the shooting.
"The investigation is continuing into what has been a very tragic evening," Patterson said. "Our sorrow and sympathy goes out to this family."
The police chief said there were other people inside the home at the time of the shooting, but she didn't expect any of them to be charged.
A neighbor said he heard a loud noise about the time of the shooting and thought it was simply Halloween mischief.
"I thought, trick-or-treat night - pranks go down. Anything goes," said Lenwood Dixon, 49, who works at a hazardous waste and recycling company. "I heard a noise like maybe gunfire, then my daughter saw a bunch of lights flashing and saw some cops."
In his six years in the neighborhood, he said he wasn't aware of any violent crimes. He said a few trick-or-treaters had been on his block that night.
"I'm surprised. Since I was here, I'd never heard of anything like that happening. It's a quiet neighborhood," he said. "You don't see many children in the neighborhood. It's more elderly."