Objectives The present study aimed to develop a random forest (RF) based prediction model for hyperuricemia (HUA) and estimate associated risk factors. Methods This cross-sectional study recruited 91,690 participants (52,607 males, 39,083 females). The prediction models were derived from training sets using RF learning machine. Performances of the prediction model were evaluated in validation datasets. Significant indicators were produced after comparing between true positive set and true negative set. Odds ratio was calculated by binary logistic regression models. Results The area under the receiver-operating curve was 0.732 in males and 0.837 in females in the RF prediction models. The sensitivity, specificity and negative predictive value of the models were 0.686, 0.656 and 0.882 in males, 0.786, 0.738 and 0.978 in females, respectively. According to the feature value of each index in RF, a total of 10 explanatory variables were selected for each gender. Triglyceride, creatinine, body mass index, waist circumference, alanine transaminase, age, weight and total cholesterol were high-risk factors for HUA in both genders. Conclusion RF demonstrated good stability and strong predictive power in predicting HUA in Chinese population. People with high risk factors should be encouraged to actively control the above factors to reduce the probability of developing HUA.