The world is once again facing massive energy- and environmental challenges, caused by global warming. This time, the situation is complicated by the increase in energy demand after the pandemic years, and the dramatic lack of basic energy supply. The purely “green” energy is still not ready to substitute the fossil energy, but this year the fossil supplies are heavily questioned. Consequently, engineering must take flexible, adaptive, unexpected directions. For example, even the natural gas power plants are currently considered “green” by the European Union Taxonomy, joining the “green” hydrogen. Through a tight integration of highly intermittent renewable, or other distributed energy resources, the microgrid is the technology of choice to guarantee the expected impacts, making clean energy affordable. The focus of this work lies in the techno-economic optimization analysis of Combined Heat and Power (CHP) Multi-Micro Grids (MMG), a novel distribution system architecture comprising two interconnected hybrid microgrids. High computational resources are needed to investigate the CHP-MMG. To this aim, a novel nature-inspired two-layer optimization-simulation algorithm is discussed. The proposed algorithm is used to execute a techno-economic analysis and find the best settings while the energy balance is achieved at minimum operational costs and highest revenues. At a lower level, inside the algorithm, a Sequential Least Squares Programming (SLSQP) method ensures that the stochastic generation and consumption of energy deriving from CHP-MMG trial settings are balanced at each time-step. At the upper level, a novel multi-objective self-adaptive evolutionary algorithm is discussed. This upper level is searching for the best design, sizing, siting, and setting, which guarantees the highest internal rate of return (IRR) and the lowest Levelized Cost of Energy (LCOE). The Artificial Immune Evolutionary (AIE) algorithm imitates how the immune system fights harmful viruses that enter the body. The optimization method is used for sensitivity analysis of hydrogen costs in off-grid and on-grid highly perturbed contexts. It has been observed that the best CHP-MMG settings are those that promote a tight thermal and electrical energy balance between interconnected microgrids. The results demonstrate that such mechanism of energy swarm can keep the LCOE lower than 15 c€/kWh and IRR of over 55%.