The Philadelphia Department of Prisons says 26-year-old Jamal Bennett attacked the 66-year-old Currran-Fromhold Correctional facility guard around 11 p.m. Friday.
Authorities said Bennett was trying to steal the officer's car.
The guard, 27-year veteran Michael Maratea, fired his personal weapon, striking Bennett in the chest.
Bennett was in critical condition at Jefferson Torresdale Hospital but was expected to survive. He will be facing new charges.
Bennett had just been released from custody on a probation violation for a weapons charge. Court documents don't list an attorney representing him.
Philadelphia Police Chief Inspector Scott Small called the incident "somewhat bizarre." He said it appears Bennett "was starting his life of crime over again within minutes of being released."
Maratea is expected to be OK.
But this has brought to the forefront what seems to be an ongoing issue between the local correctional officers' union and Philadelphia Prisons Department: inmates, their families, and guests all parking in the same lot as employees.
Local Union Rep of 159 Lorenzo North released a statement Saturday, in part reading:
"Sadly, the Commissioner of Prisons will put an inmate's family and visitors first before the safety of employees. No other prison allows visitors to park with correctional staff, but the Philadelphia Department of Prisons does."
Philadelphia Prisons Commissioner Blanche Carney responded to that statement.
"The parking arrangement in the shared parking either civilian and staff at the house of corrections has been in place over 20 years," Carney said.
She also said parking for visitors is now mostly directed to be out on State Road and more patrols will be added after this incident.
"I take all staff safety into account. I'm responsible for them and when we see that there's a situation that presents itself, and we're able to correct it and address it, we do," said Carney.
The commissioner said there will be a review of their procedures.
The Associated Press contributed to this report.