The aim of this paper is to provide a tool for finding investments in the stocks of energy firms that achieve both good financial and reasonable environmental, social, and governance (ESG) performance. Our methodology entails two steps and is based on diversification-consistent DEA models. The first step involves constructing a financially efficient frontier of investment portfolios by applying the model originally proposed by Branda (Omega 52:65–76. 10.1016/j.ejor.2007.04.014, 2015). In the second step, a new DEA model is proposed in order to find the ESG-efficient portfolios among the ones already identified in the first step and to rank them with respect to their ESG performance. This model is parameterised by a weighting system that allows us to assign different importance to the various ESG outputs. Additionally, the proposal allows an evaluation of both ESG and financial efficiency related to the financial energy market over two periods (the pre-COVID-19 and COVID-19 periods), considering renewable energy and non-renewable energy firms both jointly and separately. The results support the better financial performance of the renewable energy stock market compared with that of the non-renewable energy market.