Authorities said the incident happened around 6:44 p.m. Thursday in the 31500 block of Whispering Palms Trail, near McCallum Way. The car was described as a white 2016 Honda Accord with tinted windows and license plate 7TJR654.
Police said the owner of the car is a babysitter who stepped out of the vehicle for a moment, and when she came back the car was gone.
Investigators initially issued an Amber Alert that included descriptions of the 2-year-old boy, Carlos Cortez, and his 1-year-old brother, Jayden Cortez.
It was unclear why the babysitter had stepped out of the car.
At 2:40 a.m. Friday, Riverside County sheriff's personnel discovered the unharmed boys inside the vehicle in Desert Hot Springs, the Cathedral City Police Department said on Twitter.
The Honda, whose engine was still idling, was parked near a church in the 17400 block of Bubbling Wells Road, authorities said. The boys were in the backseat.
They underwent a medical examination and were subsequently reunited with their family, according to the police department.
The agency later posted an image of the family with police officers on Facebook.
"Crimes involving children tends to put everybody on an emotional roller coaster!" the photo's caption read. "CCPD was happy to see the Cortes family reunited this morning!"
The car thief remained at large. A description of the person was not available.
KESQ-TV contributed to this report.