With the development of the global marine transportation industry, marine accidents frequently occur due to the complex and changeable climate environment, and maritime search and rescue work has thus received much attention. To improve marine search and rescue operations, an algorithm for environmental modeling and search path optimization based on an ant colony system is proposed. First, MAKLINK is selected to build an ecological model. Secondly, the relevant parameters of the ant colony system algorithm are established, and the search and rescue route is designed. Finally, simulations of the environmental model and route design are constructed in search and rescue waters in Zhoushan, Zhejiang Province, using MATLAB. Experimental results prove the validity of this algorithm.