It happened at a home on Lincoln Avenue near Bay Avenue around 1:00 a.m.
Authorities say when they arrived several people were unruly and fighting.
Police say, as a responding officer and his K-9 partner approached the group, a large Rottweiler dog became aggressive. The owner was unable to restrain him and the dog charged toward the officer, who then fired twice at the animal.
The Rottweiler was taken to Linwood Animal Hospital in Linwood, New Jersey for emergency treatment.
The incident remains under investigation by the Ocean City Police Department and Cape May County Prosecutor's Office.