It happened Saturday around 7:20 p.m. in the 1200 block of Meadowview Circle.
Deputies responded to the area to investigate an armed robbery call. The sheriff's department said a short time later, deputies found the suspect in the 1000 block of Avenue J12.
"Deputies attempted to detain the suspect at which point the suspect produced a firearm and fired at deputies, resulting in a deputy-involved shooting," read a statement from the sheriff's department.
The suspect died at the scene. The deputy who was shot was rushed to the hospital where he remains in critical but stable condition.
Deputies recovered a gun from the scene.
The incident remains under investigation.