Hundreds of people had gathered hours earlier after videos surfaced showing the incident between the officer, whose identity has not been released, and a group of youths.
The incident occurred Tuesday over ongoing issues with children walking across the officer's property in Anaheim, a police spokesman told The Orange County Register.
The 13-year-old believed the officer had cursed a teenage girl who had walked on his lawn on Tuesday, the Los Angeles Times reported.
"The little kid said, 'I'm going to sue you,' and then the guy thought he said, 'I'm going to shoot you.' That's when he started grabbing the little kid," Gregory Perez, 16, told The Orange County Register.
One video posted on YouTube shows the officer struggling with the boy, who repeatedly denies he threatened to shoot and at one point says "Let me go. ... I'm only 13."
A taller youth steps in and tries to break the officer's grip. Another youth rushes the officer, who stumbles back through a small hedge, still holding the 13-year-old.
Tactical Alert called for large protest in area of Euclid and Palais. Avoid area. Do NOT engage in acts of violence or vandalism #anaheim— Anaheim PD (@AnaheimPD) February 23, 2017
The taller boy then takes a swing at the officer. Other teens approach and the officer - still gripping the 13-year-old with one hand - pulls a gun from his waistband, crouches, and a shot is fired.
Witnesses said the officer "did not discharge the gun toward anyone," Anaheim Sgt. Daron Wyatt told KNX-AM radio.
After police arrive, the off-duty officer puts his hands up and is walked away to be interviewed while the teenager eventually is handcuffed.
The 13-year-old boy was booked at Orange County Juvenile Hall on suspicion of making criminal threat and battery, while a 15-year-old boy was arrested on suspicion of assault and battery and later released, Anaheim police said. Their names were not released because they are minors.
The American Civil Liberties Union said in a statement Wednesday that the video was deeply disturbing, and said investigators need to explain why the boys were arrested, but not the officer who fired the shot.
Anaheim Mayor Tom Tait said in a statement Wednesday that he was concerned with what he saw in the video, and the city is committed to a full and impartial investigation.
Anaheim and Los Angeles police were investigating the incident and the officer was cooperating, Wyatt said.
The Anaheim Police Department said it was aware of "numerous videos" posted on YouTube. The department said its Homicide Detail is investigating and when the case is completed, it will be submitted to the Orange County district attorney's office.
That office will decide whether any criminal charges should be filed.
The LAPD's Force Investigation Division is also looking into the altercation and the officer has been placed on administrative leave, the LAPD told the Register.
The calm gathering of protesters was disrupted Wednesday night as some began vandalizing the officer's and neighboring homes and throwing objects at Anaheim police officers observing the demonstration across the street, the Register reported.
Protesters then took to Euclid Street, blocking traffic before confronting Anaheim police officers in riot gear who had established a skirmish line.
Police created a second skirmish line around the officer's home.
Early Thursday, police said in a statement that 24 people were arrested: 10 men, eight women, three boys and three girls. All are misdemeanor charges for variations of failure to disperse, resisting arrest, and battery on a peace officer.