Being a mom of an ex-nail biting daughter, and a professional in the natural medicine and health industry for over 20 years, here are a few of my suggestions:
1. Nail biting is not just a "nervous habit" - but can also be a mineral (calcium) and/or protein (amino acids) deficiency. Our nervous system is supported, nurtured and calmed by natural minerals - thus, if we don't have enough in our diet -or our digestive systems cannot assimulate them from our foods- then we unconsciously try to replace this deficiency by biting our nails.
Homeopathic remedies are great for kids. Consider picking up a calcium homeopathic remedy at your local healthfood store... or visit with a Homeopathic Doctor to see what s/he recommends.
2. Add natural calcium/protein rich foods to her diet. This includes almonds, sesame seeds (Raw Tahini Butter), kelp (seaweed - which is loaded with natural easy-to-assimulate minerals, dark salad greens and Spirulina (which kids love). Spirulina (green food) is rich in both minerals and protein. Brewer's Yeast (flakey yellow powder you can add to her drink) is good for B vitamins and amino acids, which also help feed the nervous system.
Note: Did you know it is hard for humans (let alone kids) to assimulate the protein and calcium in milk? Try yoghurt or goat milk products instead. Also - keep in mind that too much sugar can cause an overload in the child's nervous system, adding to the issue of mineral depletion.
3. Fun Foods: Try offering her raw, pre-soaked almonds (just put them in water and store in fridge overnight), slices of Gala apple and small cut chunks of a healthy protein bar (Cliff Bar is a good brand). My grandson loves this combo. Have her eat 1-2 almonds, one chunck of protein bar, one apple - before going to the next round.
Another fun food for kids is spreading Raw Tahini Butter on natural whole-grain crackers (also high in protein) with a touch of Agave (natural Catus honey) on top. Spirulina, soy protein powder and brewer's yeast should be added to the banana, strawberry, yoghurt shake.
4. Tell your child (after she tries these snacks and shows she likes them) that these foods have lots of vitamins and minerals in them - which will help FEED her body so she doesn't need to bite her nails.
5. As you discovered - it is not wise to try and force her to stop (ie, pulling her hand away from her mouth, or even putting bad tasting stuff on them if she doesn't want you to). Threats and control techniques may cause her to rebel. The best way to help her overcome the habit or desire is to empathize with her and help her get in touch with what her body is saying: "Do you know that you are biting your nails? Do you like the taste of your nails - or are you just feeling hungry? How does your tummy feel?"
Then follow with: "Can I offer you (something healthy to eat or drink - like soaked almonds or a "green" banana, strawberry protein yoghurt shake with Spirulina) instead?" And don't forget to use strategic "reverse psychology" - such as: "Mommy's concerned about your fingers getting really soar" ...Or... "Mommy is not going to stop you from biting your nails anymore, but I'm concerned about you eating the yucky bugs that like to hang out under your nails. Maybe we should clean your hands, so the bugs can't get inside your tummy, okay?"
Giving her permission to bite her nails, yet gently warning her like this will surely encourage her to stop on her own.
Hope this all helps!
P.S. I realize your child is still very young and might not be capable of eating raw almonds yet - thus you might use almond butter (with tahini) or almond milk in her cereal. :)