It happened just after noon in North Philadelphia at the intersections of West Harold and North 12th street.
Detectives say the 50-year-old man was waving the knife and became involved in an altercation with the officer when he fired his weapon.
Police found two knives on the man, including a meat cleaver.