Migraine is a chronic neurological disorder characterized by attacks of moderate or severe headache accompanying functionally and structurally maladaptive changes in brain. As the headache days/month is often measured by patient self-report and tends to be overestimated than actually experienced, the possibility of using neuroimaging data to predict migraine attack frequency is of great interest. To identify neuroimaging features that could objectively evaluate patients' headache days, a total of 179 migraineurs were recruited from two data center with one dataset used as the training/test cohort and the other used as the validating cohort. The guidelines for controlled trials of prophylactic treatment of chronic migraine in adults were used to identify the frequency of attacks and migraineurs were divided into low (MOl) and high (MOh) subgroups. Whole-brain functional connectivity was used to build multivariate logistic regression models with model iteration optimization to identify MOl and MOh. The best model accurately discriminated MOh from MOl with AUC of 0.91 (95%CI [0.86, 0.95]) in the training/test cohort and 0.79 in the validating cohort. The discriminative features were mainly located within the limbic lobe, frontal lobe, and temporal lobe. Permutation tests analysis demonstrated that the classification performance of these features was significantly better than chance. Furthermore, the indicator of functional connectivity had a higher odds ratio than behavioral variables with implementing a holistic regression analysis. The current findings suggested that the migraine attack frequency could be distinguished by using machine-learning algorithms, and highlighted the role of brain functional connectivity in revealing underlying migraine-related neurobiology.