The incident happened at around 1 a.m. Saturday on Linden Street between Myrtle Avenue and Wyckoff Avenue.
Investigators say when officers arrived, the James Crockett refused to drop the gun and then pointed the weapon at police.
One of the officers shot the Crockett in the chest and thigh.
The weapon turned out to be a BB gun.
Crockett is listed in stable condition at Elmhurst Hospital.
He has been charged with criminal possession of a disguised gun and menacing a police officer.