A dog that is licking and pulling the hair out of its back legs could be doing so for a few reasons. A medical condition, such as fleas or a skin infection, could cause the behaviour, as could a psychological condition. In order to stop the dog from licking and pulling at its hair, you and your vet must first determine the cause. Once the cause is determined, treatment can begin.
Take your dog to the veterinarian to determine the cause of the hair licking and pulling. The vet will give the dog an examination and look closely at its skin. He may even take blood to determine the cause. If the doctor can't find anything medically wrong with the dog, he will likely rule the cause as psychogenic.
Treat the condition that is causing the dog to pull and lick at its back leg hair. If fleas or other parasites are causing the behaviour, the veterinarian will likely prescribe an insecticide to alleviate the problem. If the dog has a skin infection, antibiotics and possibly steroids will likely be given. If allergies are the cause, the vet will probably prescribe antihistamines, along with fatty acid supplements.
Determine what could cause your dog to lick and pull at the hair on its back legs, if the condition is psychological in nature. Stress is often a cause for this type of behaviour. For instance, if a new baby has come into the home and the dog isn't receiving the amount of attention it used to, it will often display this behaviour as a means to console itself. If possible, remove the stress factor. Doing so will likely stop the dog's odd behaviour. If you cannot stop the stress from occurring, you will need to train the dog to stop the licking and pulling.
Redirect your dog's attention to something more enticing. For instance, when your dog starts to lick or pull, offer it a treat it finds especially tasty, such as peanut butter or liverwurst. You could also distract the dog by initiating play whenever it attempts to lick or pull.
Reward your dog when it doesn't lick or pull at its hair. Pet the dog or give it a treat when it is sitting or standing contently without engaging in the behaviour. Similarly, avoid unintentionally rewarding the dog when it does lick or pull the hair. Many owners will pet their dogs while they are licking in an effort to make the dog feel better. Although they may comfort the dog with petting, they are also reinforcing the dog's behaviour, as well, by providing a reward for the licking and pulling.
Exercise your dog on a daily basis. If your dog is stressed or has lots of nervous energy, exercise can help to release some of that energy. Dogs that do not have outlets to burn their energy will often lick or pull at their hair because they are so stressed and anxious. Walking, jogging, swimming or playing fetch can help to ease your dog's nerves and perhaps prevent the licking and pulling behaviour.
Consider placing an Elizabethan collar on the dog to keep it from licking and pulling its hair. Doing so can help any sores to heal by preventing the licking and pulling. However, you must also train your dog to stop biting and licking in conjunction with applying the collar. If you cannot change the dog's behaviour on your own, consider enlisting the help of a professional dog behaviourist.