If you are getting the pain durning a migraine, it probably has to do with the inflammation of your trigeminal nerve. You can google it, or I have a URL to a picture below. It wraps around your ear and goes into your jaw.
If that nerve is inflamed which is very common during a migraine, it would make sense that moving your jaw makes the pain in your head worse.
Hope that helps!!! 
Important:
We hope you find this general health information helpful. Please note however, that this Q&A is meant to support not replace the professional medical advice you receive from your doctor. No information in the Answers above is intended to diagnose or treat any condition. The views expressed in the Answers above belong to the individuals who posted them and do not necessarily reflect the views of Remedy Health Media. Remedy Health Media does not review or edit content posted by our community members, but reserves the right to remove any material it deems inappropriate.