In this paper, the optimal utilization of local biogas production in multi-energy systems is investigated. The micro-grid policy of local biogas production, to supply the variable demand of natural gas and also to convert it into electrical energy required by an energy hub micro-grid, along with other sources of scattered energy production and national electricity and gas networks, is one of the main goals of this paper. The multi-factor intelligent optimization method is considered to investigate the non-linear and heterogeneous optimization problem in the IEEE standard 33-bus energy hub microgrid. Most of the main indicators of interest are economic savings and minimization of operating costs. The multi-objective optimization method has been chosen as a method to solve the aforementioned non-linear and heterogeneous problem. Simulation has been done in GAMS software and the results of optimal load distribution of electric energy and natural gas supply for selected energy microhub have been explained and compared. The final results show a significant reduction of 46 % (2.8 thousand dollars per day) in operating costs. Significant reduction of energy flow between local network microhubs by 39.4 % is also one of the optimization results studied. Also, the Island performance of the local energy microhub has been simulated with the desired strategy. The cost of local energy microhub energy supply in island mode has decreased by 34 % (1.4 thousand dollars per day) compared to normal mode.© 2022 Published by.