ABC7 was told the guard was restocking a Bank of America ATM in Moreno Valley when someone tried to rob him.
Video from a witness shows the two men appearing to be in some sort of struggle before the suspect is shot and later seen lying on the ground.
The suspect was seriously wounded and taken to a local hospital.
Moreno Valley police say no other suspects were involved.
Ice cream vendor speaks out after vicious attack, robbery in Downtown Los Angeles