Fine-grained aircraft target detection in remote sensing holds significant research value and practical applications, particularly in military defense and precision strikes. Given the complexity of remote sensing images, where targets are often small and similar within categories, detecting these fine-grained targets is challenging. To address this, we constructed a fine-grained dataset of remotely sensed airplanes; for the problems of remote sensing fine-grained targets with obvious head-to-tail distributions and large variations in target sizes, we proposed the YOLOX-DW fine-grained target detection and recognition algorithm. First, for the problem of unbalanced category distribution, we adopt an adaptive sampling strategy. In addition, we construct a deformable convolutional block and improve the decoupling head structure to improve the detection effect of the model on deformed targets. Then, we design a localization loss function, which is used to improve the model's localization ability for targets of different scales. The experimental results show that our algorithm improves the overall accuracy of the model by 4.1% compared to the baseline model, and improves the detection accuracy of small targets by 12.2%. The ablation and comparison experiments also prove the effectiveness of our algorithm.