Miniature electron cyclotron resonance (ECR) ion sources are widely used in compact ion implanters, miniature neutron tubes, and miniature ion thrusters. To understand the mechanism of miniature ECR ion source, a miniature deuterium ion source developed by Peking University is taken as the research object. In this work, a global model based on particle balance equations is developed for studying the hydrogen plasma and the deuterium plasma inside the miniature ECR source. The research results show that both the hydrogen discharge process and the deuterium discharge process of the ion source are strongly dependent on the gas pressure and microwave power. The calculated results show that high power is beneficial to increasing the proportion of H<sup>+</sup>(D<sup>+</sup>) ions, low pressure is helpful in augmenting the ratio of <inline-formula><tex-math id="M3">\begin{document}$ {\text{H}}_2^ + $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M3.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M3.png"/></alternatives></inline-formula>(<inline-formula><tex-math id="M4">\begin{document}$ {\text{D}}_2^ + $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M4.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M4.png"/></alternatives></inline-formula>) ions, high pressure and low power are beneficial to enhancing the proportion of <inline-formula><tex-math id="M5">\begin{document}$ {\text{H}}_3^ + $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M5.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M5.png"/></alternatives></inline-formula>(<inline-formula><tex-math id="M6">\begin{document}$ {\text{D}}_3^ + $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M6.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="14-20212250_M6.png"/></alternatives></inline-formula>) ions. In addition, there is a large difference in ion proportion between hydrogen discharge and deuterium discharge. Under the same operating parameters, the proportion of D<sup>+</sup> ions is 10%–25% higher than the proportion of H<sup>+</sup> ions since the plasma density of deuterium discharge is higher than that of hydrogen plasma. Therefore, during the operation of miniature source, H<sub>2</sub> gas, instead of D<sub>2</sub> gas, can be used in experiment, and the proportion of D<sup>+</sup> ions under the corresponding operating parameters can be estimated based on the proportion of H<sup>+</sup> ions. Finally, the calculated results show that high microwave power is a prerequisite for achieving the high proportion of H<sup>+</sup> (D<sup>+</sup>) ions. However, owing to the limitation of microwave coupling efficiency, the miniature ECR ion source cannot work when the microwave power is greater than 150 W, so that the H<sup>+</sup> (D<sup>+</sup>) proportion cannot be further increased, thereby limiting its further applications in neutron sources, implanters, etc. Therefore, how to improve the microwave coupling efficiency has become one of the key research contents of the miniature ECR ion source. The global model proposed in this paper is helpful in understanding the physical process of the miniature ECR ion source, but there are also some shortcomings. Firstly, the effect of the secondary electron emission coefficient is not considered in the model, so it is impossible to study the influence of wall materials on ion proportion in detail. Secondly, the dissociation degree depends on the plasma measurements, and the error of plasma measurements in turn affect the accuracy of the model to a certain extent. In addition, only the hydrogen plasma model and deuterium plasma model are established in this work, based on which it is impossible to study the processes of other gas discharge plasmas. In the future, the above factors will be considered and the model will be further improved to establish a complete and self-consistent global model of the miniature ECR ion source.