Edgardo Acosta is charged with four felonies, including attempted murder and willful cruelty to a child. He pleaded not guilty.
The shooting happened late last week on the 3200 block of Kentucky Street, near Niles and Oswell.
The Kern County Sheriff's Office said two people were fighting in the street. The girl, her father, Acosta, and her stepmother, Lissette Navarro, went to break up the fight.
Acosta fired a shot from a handgun, striking his daughter and a 27-year-old man, whose name was withheld.
The sheriff's office said Navarro assaulted a man with a baseball bat.
The child suffered a head wound and was eventually taken to Children's Hospital Central California in Madera. The man who was shot was taken to Kern Medical Center.
Acosta, Navarro and Jose Licea, 19, were arrested.