Underwater object detection is an important research area with wide-ranging applications, from underwater exploration to ecological monitoring. However, this field faces multiple challenges, particularly the significant degradation of underwater image quality and variations in target scales. Traditional object detection algorithms struggle to accurately extract key features of underwater targets, leading to poor detection performance. This study aims to enhance the performance of underwater object detection, especially for small-scale underwater targets, to adapt to complex underwater environments. In this paper, we propose a novel underwater object detector called MPEDet based on multi-branch attention mechanism and path enhancement. Specifically, to improve the capability of the model to extract key features in complex underwater environments, we propose a multi-branch attention mechanism called MBAM, which fully utilizes the dependency information between input features and input keys to strengthen the semantic representation capability during the encoding phase. In addition, we use the designed path enhancement module to facilitate the information interaction between high and low features and reduce the loss of detailed information in the propagation of high-level features within the network. Finally, after training the proposed MPEDet underwater detector for only 24 epochs, it achieved AP50 values of 84.4% and 74.8% on the RUOD and UTDAC underwater test sets, respectively. The results demonstrate that the proposed MPEDet detector can effectively handle the task of underwater.