The successful operation of Shanghai-Hong Kong Stock Connect Trading Mechanism has broadened the investment channels of investors, promoted the convergence of domestic capital market and international capital market, and had great influence upon China’s A-share stock market stability. Based on the complex network theory, the MST-Kruskal algorithm is used to construct different networks composed of the Shanghai Stock Connect market, the Hong Kong Stock Connect market or the Shanghai-Hong Kong stock market, and the anti-attack performances of different networks, in four stages before and after the pilot project and the official operation of Shanghai-Hong Kong Stock Connect, are simulated. Then the stability of China stock market is studied. Our results show that, with the implementation of Shanghai-Hong Kong Stock Connect program, the market networks of Shanghai Stock Connect and Hong Kong Stock Connect merge constantly while maintaining their local cluster. Shanghai Stock Connect market network has a strong aggregation, while Hong Kong Stock Connect market network is relatively decentralized. Besides, the two markets maintain good robustness when facing random attacks, and show a certain vulnerability under a hostile attack. After Shanghai-Hong Kong Stock Connect launched officially, the combination of the two markets improves the stability of stock markets.In all, our conclusions provide a new logic for the stability research of Chinese stock market, and new enlightenment for regulators to develop regulatory policies and listed companies to maintain the stability of their stock prices.