The incident happened just after noon Friday in the area of the 28000 block of Sloan Canyon Road in Castaic, less than a mile west of the 5 Freeway.
Responding deputies initially saw a man and a woman fighting, sheriff's Lt. Omar Camacho said. At some point, the man allegedly pointed a gun at a deputy.
"The deputy observed the suspect produce a gun, at which time a deputy involved shooting occurred," according to a Sheriff's Department news release.
The suspect was shot and hospitalized in stable condition. It's unclear if he opened fire.
No deputies were injured.
A firearm was recovered at the scene, authorities said.
The relationship between the suspect and woman is unknown.