Topological numbers can characterize the transition between different topological phases, which are not described by Landaus paradigm of symmetry breaking. Since the discovery of quantum Hall effect, more topological phases have been theoretically predicted and experimentally verified. However, it is still an experimental challenge to directly measure the topological number of various predicted topological phases. In this paper, we demonstrate quantum simulation of topological phase transition of a quantum wire (QW) using a single nitrogen-vacancy (NV) center in diamond. Deploying quantum algorithm of finding eigenvalues, we can reliably extract both the dispersion relations and topological numbers.