Underwater object detection (UOD) technology is widely used in fields such as marine object exploration and marine environmental monitoring. However, owing to factors such as light attenuation and scattering in an underwater environment, the image quality and object resolution are poor. Additionally, the complex background, coexistence of objects at various scales, and their widespread distribution pose challenges for detection tasks. To improve the precision of underwater object detection and enhance the robustness of detection performance, this paper proposes an enhanced detection model, YOLOv8-UW, based on YOLOv8-n. First, the algorithm introduces the Coordinate Attention (CA) mechanism in the C2f module to highlight key information and suppress background interference. Next, the lightweight upsampling operator CARAFE is used to replace the interpolation upsampling in the neck network, reducing information loss during the feature fusion process and improving the ability to retain details. Finally, a multi-scale lightweight convolution and pointwise convolution (MSP) is used to achieve lightweight decoupling branches in the detection head. Through these effective improvements, our model achieves a 3.4% and 3.3% increase in mAP0.5 and mAP0.5:0.95, respectively, on the underwater biological dataset DUO, while maintaining a light model size of 2.98 M. The detection speed reaches an ideal value of 131.5 FPS. Results on the Pascal VOC dataset further verify the model’s generalizability, achieving the best overall performance.