With the increasing environmental pressure, reducing the environmental impact on hybrid flow shops (HFS) has attracted extensive attention because of its broad industrial applications. The selection of machines in the implementation of HFS is a complex decision-making process that hinders the optimization efficiency in shops. However, this issue has not been addressed thoroughly. In light of this, a multi-objective mathematical model is formulated for the minimization of makespan and energy consumption of the hybrid flow shop scheduling problem (HFSP). The environmental performance of machines is calculated by the proposed evaluation index and is ranked on the basis of the integrated entropy and fuzzy technique for order performance by similarity to ideal solution method. Moreover, to solve the multi-objective model of HFSP, an improved differential evolution algorithm with a heuristic active decoding rule that incorporates the ranking of environmental performance of machines into the iterative process of the algorithm is presented. Finally, a case study is presented to evaluate the effectiveness of the proposed method and to prove the feasibility of the ranking-based differential evolution algorithm (RBDE). The result shows that the proposed RBDE outperforms RBNSGA-II and RBPSO in searching for non-dominated solutions that can solve the environmental production of HFSP effectively.