Objective: Previous studies regarding the quantitative sensory testing are inconsistent in migraine. We hypothesized that the quantitative sensory testing results were influenced by headache frequency or migraine phase. Methods: This study recruited chronic and episodic migraine patients as well as healthy controls. Participants underwent quantitative sensory testing, including heat, cold, and mechanical punctate pain thresholds at the supraorbital area (V1 dermatome) and the forearm (T1 dermatome). Prospective headache diaries were used for headache frequency and migraine phase when quantitative sensory testing was performed. Results: Twenty-eight chronic migraine, 64 episodic migraine and 32 healthy controls completed the study. Significant higher mechanical punctate pain thresholds were found in episodic migraine but not chronic migraine when compared with healthy controls. The mechanical punctate pain thresholds decreased as headache frequency increased then nadired. In episodic migraine, mechanical punctate pain thresholds were highest (p < 0.05) in those in the interictal phase and declined when approaching the ictal phase in both V1 and T1 dermatomes. Linear regression analyses showed that in those with episodic migraine, headache frequency and phase were independently associated with mechanical punctate pain thresholds and accounted for 29.7% and 38.9% of the variance in V1 (p = 0.003) and T1 (p < 0.001) respectively. Of note, unlike mechanical punctate pain thresholds, our study did not demonstrate similar findings for heat pain thresholds and cold pain thresholds in migraine. Conclusion: Our study provides new insights into the dynamic changes of quantitative sensory testing, especially mechanical punctate pain thresholds in patients with migraine. Mechanical punctate pain thresholds vary depending on headache frequency and migraine phase, providing an explanation for the inconsistency across studies.