To address the problem of missing or repeating detection in the classical anchor-based RetinaNet, anchor-free FCOS, and other object detection algorithms, this paper proposes a novel object detection algorithm based on adaptive feature fusion and cosIoU-NMS. Firstly, the algorithm leverages an adaptive feature fusion module to obtain rich context and spatial information by weighted fusion of adjacent three-layer features in multi-scale features. Then, the cosIoU, which measures the cosine similarity and overlap area between detection boxes, is calculated to locate the target more precisely. Finally, by replacing Greedy-NMS with our cosIoU-NMS, redundant boxes with high confidence scores can be effectively suppressed, and thus retaining more accurate detection results. Based on RetinaNet and FCOS, the experimental results on the PASCAL VOC dataset demonstrate the detection accuracy of our proposed algorithm achieves 81.3% and 82.3%, with relative gains of 2.8% and 1.2%, respectively. On the MS COCO dataset, the accuracy reaches 36.8% and 38.0%, which is increased by 1.0% and 0.7%, respectively. The algorithm can improve the capability of feature representation, remove redundant detection boxes, and significantly boost the detection performance.