Faced with global environmental problems, such as global warming, enterprises have become important players in environmental protection. By fulfilling their environmental responsibilities, enterprises can create a good external image and gain support from the public and government, thereby increasing the influence of their enterprises. At the same time, the media plays the role of guiding public opinion and supervising the market economy in enterprise development and market economy. Therefore, this study investigates whether the environmental protection measures taken by enterprises have a positive effect on their sustainable development, and how media attention affects the relationship between environmental protection and sustainable development. This study uses the fixed effect regression method to empirically study the data of A share listed companies in China, from 2016 to 2019. The results of the study show that the enterprises’ fulfillment of environmental responsibilities or carbon trading can promote sustainable development. Furthermore, the higher the network or print media attention, the more environmentally responsible behavior and carbon emissions trading can promote sustainable development capabilities of enterprises. This study enriches the understanding of the important role played by environmental protection in driving enterprise sustainability and contributes to the literature by emphasizing the need for media attention about environmental responsibilities and carbon emissions trading.