In seaports, low-carbon energy systems and energy efficiency have become increasingly important as a result of the evolution of environmental and climate change challenges. In order to ensure the continued success of seaports, technological advancements must be introduced to a number of systems, such as seaport vehicles, harbor cranes, and the power sources of berthed ships. Harbor areas might need a microgrid to handle these aspects. Typically, microgrids that substitute conventional generator units with renewable energy sources (RES) suffer from system inertia problems, which adversely affect microgrid frequency stability. A load frequency controller (LFC) based on a novel modified proportional integral derivative with filter (MPIDF) is presented in this paper for enhancing the performance of marine microgrid system (MMS). The serval optimization algorithm (SOA), a recent bio-inspired optimization algorithm, is used to optimize the MPIDF controller coefficients. This controller is tested on a marine microgrid containing a number of RES such as wind turbine generators, sea wave energy, and solar generation. The efficacy of the proposed MPIDF controller is verified with respect to other controllers such as PIDF and PI. Similarly, the proposed meta-heuristic algorithm is validated as compared to other algorithms including particle swarm optimization (PSO), ant colony optimization (ACO), and jellyfish swarm optimization (JSO). This study also evaluates the robustness of the proposed controller to different perturbations in step load, changes in system parameters, and other parameter variations.