This paper presents a comparative study of four metaheuristic techniques, namely, the particle swarm optimization (PSO), genetic algorithm (GA), simulated annealing (SA), and the harmony search (HS), used in thermoenvironomic optimization of a benchmark gas turbine-based combined heat and power system known as CGAM problem. The performance comparison of the metaheuristic techniques is conducted by executing each algorithm for 30 runs to evaluate the reproducibility and stability of the optimal solutions. The study takes the exergetic, economic, and environmental factors into consideration in defining the thermoenvironomic objective function in terms of system cost rate. The thermodynamic and the economic model vis-à-vis optimization is validated by comparing the present results with previously published ones. From the optimal results, the PSO was found to be the most effective technique for thermoenvironomic optimization of the CGAM problem. Further, to highlight the benefits of optimization, the results obtained from the best method (PSO) are compared with those obtained by using the base case design variables recommended previously for the classical CGAM problem. The comparative results reveal that the system cost rate and the exergoeconomic factor of the CGAM system are reduced by 10.25% and 5.58%, respectively. Besides, the CO2 emission also reduces from 16.34 tons/h to 15.17 tons/h.