Hugging a dog is not something most behaviorists recommend. While it is a sign of affection for us, it is quite intimidating for dogs and will elicit aggression in some. It's also possible that your dog has spine/neck problems that are common in Dobermans - a veterinarian should provide more info about this. But check out Pets.com, click on the link If Your Pet Could Talk - take the quiz and watch the videos to learn more about why hugging dogs is not safe behavior and why dogs do not naturally enjoy it.
Can you share more information with us? What does your dog do when you try to "hug" him? Does he shy away from any contact? Does he do this with everyone or just strangers?
Please try and be a little more descriptive with your concern about your pet so that our doctors and behaviorists can be better prepared to answer your question.
Thanks!