If you are having pain in your scalp, then you need to go see your primary care doctor
to help you figure out what is going on.
Dry hair is a common problem, and it is almost always caused by excessive washing or chemical treatment of the hair. However, dry hair should not cause scalp irritation (unless you are currently applying chemical treatments to the hair which might be irritating the scalp). For example, if you are bleaching or dying your hair, then this could be the source of scalp pain, as these chemicals are extremely irritating to skin, and you should immediately discontinue them.
On the other hand, if you are not doing this, then your dry hair and scalp pain are unrelated. I think it is more likely that you have an inflammatory condition in the scalp itself, such as seborrheic dermatitis, which causes itching, redness, and inflammation of the scalp. This condition can be easily diagnosed by your primary care doctor and, if it is present, they can give you prescriptions for lotions or shampoos to help relieve the symptoms.
Start by setting up a visit with your primary care doctor, who will help you get to the bottom of this.