Dozens of mourners filled St. Joseph's Church in the boys' hometown, Toms River, to remember Brandon Holt.
Green ribbons were tied around nearby trees, and many mourners wore green ribbons or green attire to honor Brandon, whose favorite color was green, Neptune's Asbury Park Press newspaper reported.
The boys were playing Monday in their neighborhood when the 4-year-old got a loaded .22-caliber rifle from his family's home and shot Brandon in the head, authorities said. The boys were about 15 yards apart.
The younger boy's mother called an emergency dispatcher to report the shooting, prosecutors said. Brandon died at a hospital a day later.
No charges have been filed, but the shooting remains under investigation. The Atlantic County prosecutor's office has taken over the case because the parents of the 4-year-old have relatives who worked in law enforcement in Ocean County, where Toms River is located.
Brandon's father, Ron Holt, said he and his wife had decided to donate his organs because they believe it could do some good.
One resident said the two families had not lived in the neighborhood for long and she did not know them well.
"I'm sad for the children involved and their families, but I'm angry with whoever owns that gun and allowed a little child to get hold of it," Debi Coto, who lives a few doors down, said after the shooting.
The shooting came just days after a 4-year-old boy in Tennessee grabbed a loaded gun at a family cookout and accidentally shot to death the wife of a sheriff's deputy and amid debate over gun control laws in the wake of December's Newtown, Conn., elementary school massacre, in which 20 first-graders and six educators were slain.
Information from: Asbury Park (N.J.) Press