Angel Valerio, 30, was arrested Friday, the New York Post reported. The charges include robbery, assault and attempted criminal possession of a weapon.
Investigators say Valerio and some friends had been drinking at a restaurant Queens June 30 and encountered the police officer after they left. The officer was walking home from work.
The man identified himself as a police officer, but Valerio and his friends allegedly punched him and tried to grab his backpack and gun. They eventually ran away.
The officer was treated at a hospital for cuts and bruises.
Police: Sword-wielding man demanded free tacos
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph