my daugther started biting her nails once i took away her pacifier. unfortunately (at least in my family), the oral fixation seems to be hereditary. my dad bites his nails, i was a big-time thumbsucker, my one daugyhter had a pacifier (now nail-biter), my other daughter sucks her thumb, my cousin sucked her finger.
fortunately we seem to outgrow the finger sucking but the nail-biting seems to stick around for life. i don't think you can get your son to change unless he wants to, and he probably won't for a long time. as other posters said, it's an unconscious habit.
on a brighter note, my daughter seems to do it less now a few years later (with no action on my part). now she mostly does it when she's going to sleep. at least you have a boy who won't be expected to have nice nails.
of course if he's not the orally-fixated type, i guess i can't help you much other than to say that if he's a stubborn child, making a big issue of it will only make him dig in his heels more. just try keeping his hands busy. maybe give him something small to carry around and play with or touch so he doesn't stick his hands in his mouth.
if he doesn't want to be doing it either, using the nail biting stuff might work but it he doesn't want to quit (and was as stubborn as i was), he'll just bite through the nasty taste and get used to it.