Deputies were called to the area of Alpine and 5th Street Tuesday afternoon after neighbors heard gunshots.
A spokesperson said when deputies arrived they found a man in the apartment complex parking lot, still holding a gun.
"They ordered him to comply, get on the ground, and drop the weapon. He did. He was very cooperative in that sense," said Kings County Sheriff's Department Commander Robert Thayer.
Investigators identify the suspect as 45-year-old Carlos Serrano. They said they found the shooting victim, Serrano's son-in-law, inside a downstairs apartment.
The shooting happened just blocks away from Avenal's National Night Out celebration at a nearby park.
Word of the shooting spread quickly. "It's a shock. I'm like, 'wow, here in Avenal?' These things happen here sometimes, but it's a shock," said Avenal resident Amanda Mendoza.
The victim's identity hadn't been released. So far, there is no word on a motive.