Fitness and bodybuilding are becoming the trend of the development of sports projects today, not only to bring health to the exercisers, but also to keep the body in good condition. However, due to the wrong attitudes and methods of exercisers, they often have negative effects on exercisers, such as sprains, strains, and tendon strains. This article is based on data mining technology to realize the research of exercise injury prevention methods, so firstly, it introduces the steps and applications of data mining technology and highlights the cluster analysis method in data mining technology. Then it discusses the injury factors of fitness and bodybuilding and outlines the best measures to prevent exercise injury. At the same time, the C4.5 algorithm was introduced to realize the processing of the data set, and the effectiveness of preventive measures was proved by investigating the damage of fitness and bodybuilding exercises in 15 clubs in a certain city. The results of the study show that the number of people who exercise more than 3 times a week accounts for 65.6% of the total number of people, which shows that exercisers in a city’s fitness club exercise more frequently each week.