The recent surge in fuel costs and stringent gas emission regulations mandated by the International Maritime Organization (IMO) has prompted research into integrating renewable energy and energy management strategies (EMS) onboard ships. This study illustrates the computation, simulation, and optimization of a hybrid renewable energy system (HRES) to ensure continuous power supply for auxiliary loads and critical systems on both conventional and fully autonomous tugboats. The primary aim is to design an optimal HRES with minimal annualized cost of system (ACS) and a higher proportion of renewable energy while using an artificial bee colony (ABC) algorithm. Validation of optimization outcomes is conducted using particle swarm optimization (PSO), genetic algorithm (GA), and Hybrid Optimization of Multiple Energy Resources (HOMER) Pro. The HRES incorporates diesel generators (Gensets), photovoltaic (PV) arrays, vertical axis wind turbines (VAWT), and battery banks. The optimal HRES configuration for both conventional and fully autonomous tugboats is found to be Genset/PV/VAWT/Battery. We observe that the ABC algorithm exhibits superior convergence, reliability, cost-effectiveness, renewable energy fraction, and reduced carbon emissions compared to alternative algorithms. Results of robustness tests suggest that the shipload variation, fuel prices, temperature fluctuations, wind speed and solar irradiance along the navigation route have significant impact on the optimal HRES configuration. Ultimately, we conclude that the fully autonomous tugboat demonstrates superior performance in terms of costs, carbon dioxide emissions, and renewable energy fraction compared to its conventional counterpart.