William Boyle’s new novel opens with a collision: A young woman dies when 14-year-old Bobby Santovasco hurls a rock at her car, sending it careering into oncoming traffic. The book closes five years later, in 2001, with the violent clash of a memorable assortment of South Brooklyn-ites, one of whom is the accident victim’s still angry and bereft father, Jack. In an interview last year, Boyle said he tries to write about how bad people can do good things and good people can do bad things. In “Shoot the Moonlight Out,” Boyle achieves his aim marvelously.

Boyle grew up in the neighborhood he always writes about, and he knows so well how small a world it can be. Several of his characters in “Shoot the Moonlight Out” meet in St. Mary’s Church, where recent college graduate and aspiring novelist Lily Murphy runs a writers group. Others are connected one way or another to Max Berry, a neighborhood Ponzi scheme “investment counselor” who is addicted to drinking milk out of half-pint cartons and has a thing for goth Catholic school girls. Charlie French, a sadistic mob wannabe, stashes a bag full of extortion-scheme cash in Max’s safe. The bag is a tried-and-true MacGuffin if there ever was one, and Boyle is just the writer to make the most of it. Who will end up with the cash, how much blood will spill in the meantime, and which basically good people will get hurt or perish?

All of Boyle’s characters are good and bad in varying combinations, and none more so than Jack. After his wife died of cancer but before his beloved daughter Amelia died at the hands of the reckless Bobby, Jack quit his job as a Con Ed meter reader and mostly stayed home and drank. He found a purpose in life only when a victim of Max’s scamming asked for Jack’s help and he discovered he had a talent for revenge. Others who had been wronged soon began to hire him. His earnings as a freelance enforcer paid Amelia’s college tuition. When Jack joins Lily’s writers group, he’s already renounced violence — or has until fatherless Lily, now a daughterlike companion, is stalked by a dangerous ex-boyfriend.

Boyle alternates the points of view of his characters, getting inside the heads of each with never a false note. Young aspiring filmmaker Francesca Clarke rolls her own cigarettes because “no filters means no guilt over dotting the sidewalk with trash.” She falls for the now-19-year-old Bobby because he’s “cool and anxious at the same time. . . . Everything about him screams of the neighborhood.”

The neighborhood is everything for Boyle’s characters — except for those like Lily who find it claustrophobic and limiting. Before Bobby’s darkest nature shows itself again, he and Francesca also have what is to them a romantic escape. They take the train to Manhattan and manage a tryst in a cheap Chinatown hotel where “the bed is sunken in like a cake taken out of the oven too soon.”

Details like those are Boyle’s forte, as are his great quick sketches of minor characters. A motorist who grabbed young Bobby and his buddy, Zeke, as they were assaulting cars had “the body of someone who played softball as an excuse to drink beer.” The always sympathetic Lily has a moment of insight in one of the novel’s most tender scenes, with her and Jack and Francesca. “She’s thinking that this is what it should be like to come home to family. Everything revolving around laughter and booze.” It’s the modest goal so many people ache to achieve in William Boyle’s Brooklyn, though not all that many succeed.

Richard Lipez writes the Donald Strachey PI novels under the name Richard Stevenson.

SHOOT THE MOONLIGHT OUT

By William Boyle

Pegasus Crime. 310 pp. $25.95