"The call was about a male who was acting erratically and threatening people inside the gym," said Lt. Pat Nelson of the L.A. County Sheriff's Department.
When police arrived, Valencia took off, allegedly brandishing a folding knife during the pursuit.
Valencia led police to his South Gate home, where neighbor Carlos Vasquez heard the chase come to an end.
"All I heard was like a car break, so I woke up suddenly. I seen my neighbor right here just run out of his car. Well I couldn't really see a good angle, but I saw just a bunch of cops run through the back," Vasquez said.
They chased him to South Gate, where they say he got out of the car and struggled with officers.
Investigators say officers used a Taser-like device to subdue him, but he continued to struggle with officers.
Sheriff's detectives say the officers realized that Valencia wasn't breathing after he had been handcuffed. They administered CPR and transported Valencia to a hospital, where he was pronounced dead.
Investigators say Valencia may have been on medication to treat psychiatric problems.
"He would just walk around the neighborhood at weird times, like 12 in the morning, 4 in the morning, bouncing his basketball, just walking around in his boxers," Vasquez said. " It was kind of awkward, but then again he wouldn't bother us so I wouldn't mind."
Valencia's family is not commenting at this time.
Investigators say they don't believe that the Taser had malfunctioned, but they will test it as part of their investigation.
Detectives say that historically using the Taser has been a safe way to subdue a suspect who is considered combative.