The shooting happened at the Tall Timbers condominium community near Westchester Drive and Whitemarsh Court around 10:15 a.m. Monday.
Authorities said Craig Mueller, 45, stood in his second floor bedroom and fired a semi-automatic, military-style rifle out the window, killing his 52-year-old brother, Brian.
After seeing him go down a passerby, 21-year-old Cara Ellis, ran to help him. However, police say, Craig Mueller was still shooting and Ellis was struck and killed.
Craig Mueller's body was eventually found inside the home, officials said.
Police said the brothers lived together and Cara Ellis was not related to them.
"We believe that Cara was, unfortunately, caught in the crossfire here and was, in effect, a good Samaritan who was trying to run to the assistance of Brian," said Ocean County Prosecutor Marlene Lynch Ford.
Residents say as many as two dozen shots were fired.
Investigators said they do not know what provoked the shooting.
Lisa Santana, who lives near the shooting scene, said the sound of gunfire jolted her out of bed.
"I was sleeping in my bed and I heard gunshots - five of them, maybe 10. Oh, my God," she said.
She looked outside and saw a man's body on the pavement. Within minutes, police were knocking on her door, telling her she had to evacuate for her safety.
She took refuge at the municipal building, where she was worried about her son, a seventh-grade student at a school nearby.
Schools in the district locked down to prevent students from leaving. But children were being taught in classes as usual while police sought the gunman.
"I want my son right now," Santana said. "I want to go home. I don't know what's going on. All they told us is we had to leave."
Graham Heald was in telephone contact with his girlfriend, who lives in the housing development where the shootings took place. He would not name her.
"She said she heard gunfire, and opened our sliding door and she could smell the gunpowder," Heald said. "She said the houses across the street had bullet holes in them. I told her to get to the center of the house into the bathtub, and if she heard anymore gunfire, to crouch down into the bathtub."
Heald said his girlfriend reported hearing additional gunshots around 1:30 p.m.
The Associated Press contributed to this report.