The future distribution network comprising different ENERGY CARRIERS will include smallscale ENERGY resources (SSERs) and loads, known as a Networked multi-carrier microgrid (NMCMG). This concept not only leads to an efficient reduction in operation costs, but also encompasses the ENERGY transformation between gas and electric networks at combined nodes, as well as district heating networks. In this paper, the combined natural gas and electricity optimal power flow (GEOPF) is employed to represent the inter-area transmission networks. The optimal GEOPF of NMCMG, which is represented as an ENERGY hub system, is formulated as an optimization problem that is solved by applying a mixedinteger nonlinear programming (MINLP) technique. The proposed model is capable of minimizing the system costs by utilizing various sources and integrating the multiple-ENERGY infrastructures as well as handling the ENERGY management of the network. Simulations are performed on a system with three microgrids including combined heat and power (CHP), photovoltaic arrays, wind turbines, and ENERGY storages in order to fulfill the required multiple demands. In the proposed model, microgrids are in gridconnected mode in order to exchange power when required. The results of the simulation demonstrate that GEOPF guarantees the regulation of power demand and power transaction in the multi-carrier microgrid (MCMG) and the main grid.