How can I prevent my hand from hurting when I write?

Modification. Any activity overdone can cause problems and writing is no different. Take frequent breaks while writting and stretch your fingers and wrists. Try a larger grip on your pen or pencil. Always maintain a comfortable position.
Writer's cramp. Writer's cramp is a focal dystonia of the fingers, hand, and/or forearm. Symptoms usually appear when a person is trying to do a task that requires fine motor movements, such as writing or playing a musical instrument. The symptoms may be isolated to only those tasks or affect the muscles in a more general way and spread to affect many tasks. Treatment is occupational therapy or Botox injections.