In this study, we propose a subgraph learning method based on the Markov chain Monte Carlo framework. Further, we obtain an iterative process with respect to the subgraphs in the state space by constructing a Markov chain and optimal subgraphs for matching to effectively improve the graph matching precision and reduce the impact of the discrete values. During this process, the proposed method can effectively save the pairs of matching points under one-to-one matching constraints, avoiding the influence of the discrete and distortion values. Furthermore, the experiments are conducted with respect to the synthetic image dataset, real image dataset, and three-dimensional model dataset. The experimental results demonstrate that the proposed method is superior in the graph matching process.