This study introduces a novel application of modified particle swarm optimization (PSO) for optimizing multi-energy hub systems (EHSs) to enhance efficiency and sustainability. The proposed method leverages PSO to optimize the scheduling of various energy resources, including gas turbines, biomass units, and renewable sources such as solar and wind power. Unlike traditional optimization approaches that rely on genetic algorithm (GA) and complex encoding schemes, the PSO algorithm simplifies the process using real-valued vectors and direct communication within the swarm, which significantly reduces implementation complexity. Key contributions of this work include the development of a tailored PSO algorithm that integrates seamlessly with the multi-objective optimization of EHSs. The algorithm simultaneously targets a reduction in operational costs and carbon emissions, offering a comprehensive solution for energy hub design. The proposed PSO approach has demonstrated a 10.35 % reduction in operating costs and an 85.03 % decrease in CO2 emissions compared to traditional baseline setups. In comparative analysis, the integration of renewable sources using the PSO algorithm resulted in a 77.91 % reduction in total CO2 emissions and an 85.61 % decrease in operating costs, showcasing its effectiveness in advancing both economic and environmental objectives. Furthermore, the study provides a detailed evaluation of various scenarios, revealing that the PSO-optimized EHS configuration achieves a significant reduction in reliance on non-renewable energy sources (RES). For instance, the incorporation of photovoltaics and wind turbines in the EHS setup led to a 46.39 % increase in energy sold to the grid and a 26.82 % decrease in electricity purchased from external sources. These quantitative results underscore the robustness and practical benefits of the proposed PSO method in designing and optimizing energy systems for improved sustainability and cost-effectiveness.