With the long-term dependence of humans on ore-based energy, underground mines are utilized around the world, and underground mining is often dangerous. Therefore, many underground mines have established networks that manage and acquire information from sensor nodes deployed on miners and in other places. Since the power supplies of many mobile sensor nodes are batteries, green communication is an effective approach of reducing the energy consumption of a network and extending its longevity. To reduce the energy consumption of networks, all factors that negatively influence the lifetime should be considered. The degree constraint minimum spanning tree (DCMST) is introduced in this study to consider all the heterogeneous factors and assign weights for the next step of the evaluation. Then, a genetic algorithm (GA) is introduced to cluster sensor nodes in the network and balance energy consumption according to several heterogeneous factors and routing paths from DCMST. Based on a comparison of the simulation results, the optimization routing algorithm proposed in this study for use in green communication in underground mines can effectively reduce the network energy consumption and extend the lifetimes of networks.