It was not immediately clear what sparked the gunfire, which occurred around 9 a.m. in the area of Madison Street and Broadway in the northern New Jersey community.
A 7-year-old boy was pronounced dead at the scene, while his mother and 11-year-old brother were both hospitalized in critical condition. Their names were not immediately released by police.
The gunman was also taken to the hospital, where he died a short time later. Authorities were trying to determine whether he was related to the victims.
Police have cordoned off two blocks in the area and recovered some shell casings, but it was not immediately known what type of weapon was used.
Will Hayes, a city resident who witnessed the incident, told The Record of Bergen County that the gunman ran after the three victims and fired "multiple shots." He said the off-duty officer - who was in a car at a nearby fast food restaurant - saw what was happening and confronted the man, telling him to stop and drop his weapon.
When the gunman refused the order, the officer shot him, Hayes said.
"One kid was trying to get up," Hayes said. "They were young. I started crying."