As the leading financial institutions in China, it is crucial for commercial banks to pay attention to environmental protection (E), social responsibility (S), and corporate governance (G) in order to enhance operational efficiency and to advance the high-quality development of the country’s social economy. This research explores the market share of banks as exogenous variables in the profit stage and the market and sustainability stage to investigate the efficiency of 20 listed banks in China over 2016–2020 and innovatively incorporates indicators such as green credit, social giving, executive compensation, and ESG score into the meta-dynamic two-stage SBM under the exogenous variable DEA model. The results demonstrate the following. (1) By integrating market share as an exogenous variable in the model, the efficiency estimate is more precise. (2) In overall, UCBs are the most efficient type of banks, JSCBs are the second, SOCBs are the least efficient. All three types of banks are more efficient in profit stage versus the market and sustainability stage, JSCBs perform best in the profit stage, where SOCBs perform best in the market and sustainability stage. The three different bank types’ TGR performance is comparable to their efficiency value performance. (3) SOCBs lead in ESG investment and have the best ESG performance due to their distinct state-owned background. With their ongoing dedication to profit maximization and disregard for social responsibility and sustainable development, JSCBs have the worst ESG performance. (4) Policy recommendations are made based on the study’s findings for commercial banks, stakeholders, and regulators to support ESG investment and to bring about long-term sustainable development. Finally, as ESG develops in China, future research can consider longer time scales and larger perspectives to investigate the sustainability efficiency of commercial banks themselves, as well as their role in the local economy and industrial transformation.