RELATED: 2-year-old Fresno boy that accidentally shot himself laid to rest
The shooting happened about 9:15 a.m. in the 2700 block of Duffy Street.
San Bernardino County Sheriff's Department officials said the 4-year-old boy got access to the weapon and accidentally opened fire, killing the 2-year-old girl.
RELATED: 3-year-old boy struck in head by bullet fragments in Oakland
It was not immediately known who the gun belongs to and how the child got hold of the gun.
An investigation was ongoing.