To realize the high-precision and real-time tennis detection of intelligent tennis recycling robot, a lightweight tennis detection algorithm CAG-YOLO is proposed. Firstly, Coordinate Attention GhostBottleneck(CAG) is proposed and a lightweight backbone network CAG-Backbone is constructed. Bidirectional feature pyramid network is used for feature fusion. SCYLLA-IoU is used to calculate the coordinate regression loss, and an improved post-processing method of Non-Maximum Suppression is proposed to solve the problem of tennis overlap. The experiment on Wtennis dataset shows that the accuracy of CAG-YOLO is improved by 8.6% and the model volume is reduced by 31.7% compared with baseline method. The detection speed is 21ms, outperforming the competitive algorithms. It proves that CAG-YOLO can improve the detection accuracy with small-scale parameters and is easy to be transplanted to mobile intelligent device hardware.