The injured 27-year-old man was taken to the hospital, where he was listed in stable condition following surgery. No officers were hurt.
Anaheim authorities said the unidentified Anaheim police officer was driving home through the Anaheim Hills neighborhood when he encountered the man. The officer is a resident of the neighborhood.
"It woke me up for the rest of the morning, so I went out and saw detectives driving all over the place and the helicopters and so forth," said Anaheim Hills resident John Honjiyo.
Officials did not say what led to the shooting but neighbors said they could hear the man crying.
Area resident David Deridder said he heard the officer directing the man to stay on the ground. Deridder said he also heard the man asking the officer why he got shot. The officer responded, "You were burglarizing."
The shooting happened at about 5:40 a.m. on the 1000 block of South Rexford Lane in the middle of a cul-de-sac.
Authorities have not identified the man but said it does not appear that he was armed. Officials also said there was no evidence of a break in at the shooting scene or any sign of a crime in progress.
The Orange County District Attorney's Office was assisting Anaheim police with their investigation.