The COVID-19 pandemic highlighted the urgent need for effective surface disinfection solutions, which has led to the use of mobile robots equipped with ultraviolet (UVC) lamps as a promising technology. This study aims to optimize the navigation of differential mobile robots equipped with UVC lamps to ensure maximum efficiency in disinfecting complex environments. Bio-inspired metaheuristic algorithms such as the gazelle optimization algorithm, whale optimization algorithm, bat optimization algorithm, and particle swarm optimization are applied. These algorithms mimic behaviors of biological beings such as the evasive maneuvers of gazelles, the spiral hunting patterns of whales, the echolocation of bats, and the collective behavior of flocks of birds or schools of fish to optimize the robot’s trajectory. The optimization process adjusts the robot’s coordinates and the time it takes to stops at key points to ensure complete disinfection coverage and minimize the risk of excessive UVC exposure. Experimental results show that the proposed algorithms effectively adapt the robot’s trajectory to various environments, avoiding obstacles and providing sufficient UVC radiation exposure to deactivate target microorganisms. This approach demonstrates the flexibility and robustness of these solutions, with potential applications extending beyond COVID-19 to other pathogens such as influenza or bacterial contaminants, by tuning the algorithm parameters. The results highlight the potential of bio-inspired metaheuristic algorithms to improve automatic disinfection and achieve safer and healthier environments.