Maricopa County authorities say 53-year-old Paul Armand Rater is being held on suspicion of two counts of child abuse and one count of child endangerment.
Bond was set at $25,000 at Rater's initial court appearance Monday. He doesn't have a lawyer yet.
Rater took his granddaughter for a ride in the desert in his new pickup truck Sunday.
He told authorities the vehicle got stuck and they had to walk for help because he left his cellphone at home.
Rater says he left the girl under a tree with a gun when she couldn't walk anymore.
"She was given the gun and told to shoot any bad guys," said Maricopa County Sheriff Joe Arpaio. "I don’t know how a five-year-old can tell a good guy from a bad guy but that’s what she said she was told."
A helicopter later located the uninjured girl. Rater was found eating and drinking at a restaurant.