He is identified as Xavier Nelson.
A witness told investigators that a woman in her 20s left the boy at the bus stop at Broadway and Florence Avenue shortly after midnight Friday before she boarded a bus. The boy was asleep at the time.
Investigators say the grandmother told them the boy and his mother had left Bakersfield a week ago Monday.
The child is in the custody of Children and Family Services.
AP contributed to this report.