Deep learning-based algorithms for detecting objects in remote sensing images have produced excellent results recently. However, the target recognition and classification process of remote sensing images has problems such as dense targets, uneven distribution, large-scale changes and complex backgrounds. In order to improve the effectiveness of existing detection methods, based on the YOLOX algorithm, a remote sensing image object detection algorithm introducing Global Attention Mechanism (GAM) and Feature Enhancement Module (FEM) proposed, named the M2-YOLOX(GAM+FEM+YOLOX) algorithm. First, a novel GAM module is developed that employs a sequential channel-space attention mechanism and redesigns the Convolutional Block Attention Module (CBAM), to address the issues of low effective information extraction and weak information representation of the feature map in the backbone network. CBAM is capable of amplifying global dimensional interaction features while reducing information dispersion as well. Second, the goal of the FEM is to improve the target feature extraction capabilities of the backbone feature extraction network by fusing numerous perceptual field features in lower-level feature maps. Then, the Flexible Rectified Linear Unit (FReLU) activation function is introduced under the action of feature fusion and global attention mechanism. Four-way feature map output in Feature Pyramid Networks (FPN) with Non-Maximum Suppression (NMS) and score filtering for object detection and output results. In comparison to the YOLOX algorithm, the experimental results show that the mAP value of the M2-YOLOX algorithm is improved by 0.0123, the LAMR value is decreased by 0.0150, the Precision rate value is increased by 0.105450, the Recall value is increased by 0.053250, and the mF1 value is increased by 0.0425.