I wonder if a positive consequence would be better than a negative one.
Not knowing how old the child is... perhaps you can think up, together a code word... say Popsicle. Each time you see him biting his nails, say the code word as a reminder not to bite his nails. Start a chart with stickers and reward him for periods of time when he didn't bite, setting the number of uses of the code word. At the end of a given period of time he gets a treat.
If he needs to bite, or have something in his mouth... perhaps at the times when he is nervous/needing to bite his nails... give him something acceptable to bite or do with his hands. Some sorta of soft stress ball... pretzels to munch... etc.
Positive enforcement almost always works better than negative. He isn't isn't being "bad" or acting poorly - he has a habit, and needs help breaking it. I'm not sure taking his toys away is going to help.
BIG HUGS!!