This paper presents an algorithm for detecting oil spills on water surfaces based on deep learning, using multispectral images from a 5-channel camera obtained from unmanned aerial vehicles (UAVs). The algorithm, based on the Unet architecture with an efficientnet-b0 encoder, demonstrates high segmentation accuracy and is part of an environmental monitoring system. Utilizing data on natural and controlled oil spills, as well as organic discharges, the method has undergone field testing on various water bodies, confirming its efficiency and reliability in rapidly identifying contamination. The results show that the proposed algorithm can automatically detect even minor pollution of water surfaces, enabling prompt response to environmental disasters and minimizing their consequences. The paper pays particular attention to the accuracy and speed of the algorithm. The developed method boasts high data processing speed and can be successfully applied in various climatic conditions.