Police say the incident happened Sunday night around 7 p.m. at the Gas Light Apartments in Wausau.
Officer Jason Rasmussen knocked on the door of 52-year-old Terry Olson's apartment after Olson reportedly refused to pay a cab fare.
When Olson opened the door, he was holding a 22-caliber rifle. Officer Rasmussen tried getting the weapon away from him and the gun went off.
Deputy Chief Paul Luoma said, "Any time a weapon is discharged your concern is for the welfare of everybody involved. Luckily nobody got hurt."
Olson was charged Monday in Marathon County court with recklessly endangering safety and operating a firearm while intoxicated.