Fauquier County sheriff's Lt. James Hartman says the male inmate was awaiting a hearing when the attack occurred around 1 p.m.
One deputy was shot in the leg, and the other was stabbed in the face.
Hartman says the inmate took the gun from one of the deputies, but it's not clear what he used to inflict the stab wound.