The development of e-commerce breaks through the restrictions of traditional commerce in time and geography and enables people to carry out e-commerce activities conveniently, quickly and securely anytime and anywhere. This paper takes the Internet as a competition and communication platform, forms an e-commerce ecosystem through collaboration and resource sharing, and provides the evolution path of the e-commerce ecosystem. In the paper, the evolutionary game theory is cited, the game strategy is expressed through Nash equilibrium, and the three-way competitive evolutionary game model of the e-commerce ecosystem population is established with the revenue function as the optimization objective, presenting the evolution process from individual behavior to group behavior to adopt the strategy. To verify the application of the three-way evolutionary game model presented in this paper in the sustainable development of e-commerce ecosystems, an evolutionary game analysis was performed. The results show that: under the same degree of random disturbance, the fluctuation amplitude of the leader population is between 0.01 and 0.02, and the key population is most affected by random disturbance, and its fluctuation range is able to reach 0.05 to 0.95. In 2013, after the invasion of Tmall, its market share rapidly reached 49.35% from 1.49%, and Jingdong dropped to 19.11% after it, and the B2C e-commerce ecosystem changed significantly. Participating parties in the e-commerce ecosystem under the perspective of green health need to choose the right time to cooperate so as to promote the stable and sustainable development of the e-commerce ecosystem.