Abstract In order to establish an accurate time series model of wind power and raise the accuracy of the model, an Markov chain Monte Carlo (MCMC) method based on the decision model of state number is proposed. First, the original power sequence is filtered, and the power state sequence is generated by Metropolis-Hastings sampling to improve the calculation efficiency and accuracy of wind power modeling. Secondly, according to the generated state sequence of wind power, the power value of the previous time is used to superimpose fluctuation quantity and noise, which improves the correlation of the generated wind power sequence. Finally, the decision model of state number is constructed according to the two evaluation indexes to determine the optimal wind power, avoiding the defect that it is difficult to obtain the optimal wind power sequence by manually selecting state number. Finally, taking a wind farm in Ningxia as an example, the different characteristics of wind power generation and different sampling methods are compared and analyzed. The wind power sequence generated by this method is superior to the existing methods in each evaluation index, and can better reproduce the data characteristics of historical power sequence.