It happened around 9:45 p.m. on the 1300 block of Alfred Avenue.
Police said the deputy was shot after getting out of his car.
Investigators said two suspects approached the 35-year-old victim, pointed a gun at him and demanded everything that he had.
Police say deputy sheriff was taken to Penn Presbyterian Hospital in stable condition. There was no immediate word on his condition.
A woman who was with the off-duty deputy during the incident was not injured.
Police took two people into custody Tuesday night, but they have been released.