Most existing object tracking research focuses on pedestrians and autonomous driving while ignoring sports scenes. When general object tracking models are used for ball tracking, there are often problems, such as detection omissions due to small object sizes and trajectory loss due to occlusion. To address these challenges, we propose a ball detection and tracking model called HMMATrack based on multiscale feature enhancement and multilevel collaborative matching to improve ball-tracking results from the entire process of sampling, feature extraction, detection, and tracking. It includes a Heuristic Compound Sampling Strategy to deal with tiny sizes and imbalanced data samples; an MNet-based detection module to improve the ball detection accuracy; and a multilevel cooperative matching and automatic trajectory correction tracking algorithm that can quickly and accurately correct the ball’s trajectory. We also hand-annotated SportsTrack, a ball-tracking dataset containing soccer, basketball, and volleyball scenes. Extensive experiments are conducted on the SportsTrack, demonstrating that our proposed HMMATrack model outperforms other representative state-of-the-art models in ball detection and tracking.