It happened around 1:00 Wednesday morning at a home on Hansen near Chestnut in a county island of Merced.
Sheriff's deputies say someone walked up to the home and fired several rounds, hitting the little girl three times.
Her parents rushed her to the hospital before deputies even arrived at the scene.
Tom Mackenzie with the Merced County Sheriff's Department said, "The motive is still under investigation. Why someone would target a seven-year-old girl is beyond me, so like I said, at this point we don't know why they decided to target that house."
The little girl was hit once in the leg and twice in the arm. She is expected to be okay.