My first "gun" was an air rifle, .17 cal. single shot, full size though and probably too big for a 5yo as I got it later than that age because of my parents' attitudes towards guns. Still have it and will keep it, handy for little pests in my garden (when I don't have to worry about neighbors it will be anyways but that's another story...) and the pellets are dirt cheap, cheaper than .22's for that purpose. I had toy/squirt/cap guns a lot as a kid but I always knew there was a big difference btwn. those toys, and real weapons of any caliber. And even with the cap guns I was told not to point them at people. Water guns were different of course...anything but the face was fair game...
Get him a BB gun or small air rifle to start with. Just be sure he is well supervised when he uses it, be right there with him, and keep it locked up when you ain't with him using it, to avoid him sneaking into it...
And of course, though I make these suggestions, you are the parent and know your child best, go with your instinct on what you feel is safest with him...