The dog was struck in the shoulder and taken into the care of Kern County Animal Services, along with two other dogs.
The deputies were sent to the 300 block of El Tejon Avenue in Oildale on a trespassing call. There, they saw a man and tried making contact, but the man, 30-year-old Brian Whitbey, ran into the house.
The house had a posting that it was an unsafe dwelling, according to the sheriff's office.
As the deputies chased Whitbey into the house, they were met by a pit bull at the back door. The deputies tried to get the dog away with batons before opening fire, the sheriff's office said.
Whitbey hid in the attic but was eventually forced out and arrested with three other people found inside the house: 21-year-old Hayward Skogland, 27-year-old Jessica Funke and 30-year-old Tyler Funke.