The incident began at about 6 a.m. in the area of Penn Street and Painter Avenue when police responded to a report of an armed man walking down the street in a threatening manner.
The suspect picked up a stick, threw it and struck one of the officers, according to Lt. Steve Jauch of the Los Angeles County Sheriff's Department.
"At some point ... the man charged at them with a machete," prompting the police to open fire, the lieutenant said.
Tarah Rios, who lives nearby, said she "heard like pop, pop, pop."
"It sounded like fireworks," Rios said, "My mom ran downstairs, and that's when we went outside and then we saw a body on the floor."
The suspect was transported to a hospital, where he later died. He was not immediately identified.
Neither officer was injured. It was unclear how many shots were fired. Yauch said the man was struck "multiple times."
Afterward, what appeared to be a machete was visible on a red-splattered sidewalk at the scene, located about one block from Whittier police headquarters.
In accordance with protocol, homicide detectives from the sheriff's department were investigating the shooting. Anyone with information about the confrontation is asked to call the sheriff's Homicide Bureau at (323) 890-5500.