In this paper, the economically self-sufficient microgrid is planned to provide electric power and heat demand. The combined heat and power-based microgrid needs strategic placement of distributed generators concerning optimal size, location, and type. As fossil fuel cost and emission depend mainly on the types of distributed generator units used in the microgrid, economic emission dispatch is performed for an hour with a static load demand and multiple load demands over 24 h of a day. The TOPSIS ranking approach is used as a tool to obtain the best compromise solution. Harris Hawks Optimization (HHO) is used to solve the problem. For validation, the obtained results in terms of cost, emission, and heat are compared with the reported results by DE and PSO, which shows the superiority of HHO over them. The impact of renewable integration in terms of cost and emission is also investigated. With renewable energy integration, fuel cost is reduced by 18% and emission is reduced by 3.4% for analysis under static load demand, whereas for the multiple load demands over 24 h, fuel cost is reduced by 14.95% and emission is reduced by 5.58%.