I've done this too, actually I still do sometimes... it could be because your scalp is itchy, but it's likely more because of cognitive/behavioural/emotional stuff than actually having an itchy or dry scalp. Why do you think you do it, do you think about anything while doing it, are you even aware you are doing it while you're doing it? I've been told if you've got an urge to do something, you should find ways to occupy yourself. So if you bite your nails, find something to do with your hands and chew gum so you won't bite your nails. So maybe a solution would be to wear a hat, and/or find something to occupy your hands with? Is there anything similar about the times that you do it? I tend to do it when I'm bored, stressed, anxious ... but I'm not looking for the pain (which is strange, since I've also dealt with self injury which is different for me) ... it's almost satisfying?
Have you thought about talking to a doctor about it, or seeing a counsellor/therapist?
Edit: In trying to find useful information for you that might help, I came across this. Maybe it will help?
http://www.associatedcontent.com/art...it.html?cat=70
Another edit: Actually, I think I did a post about similar stuff a while back. I'm not diagnosing (since I can't since we're all just peers here!) but maybe look at dermatillomania and see if you can identify with it?