As one of the factors (e.g., material properties, surface quality, etc.) influencing the corrosion processes, researchers have always been exploring the role of environmental factors to understand the mechanism of atmospheric corrosion. This study proposes a random forest algorithm-based modeling method that successfully maps both the steel’s chemical composition and environmental factors to the corrosion rate of low-alloy steel under the corresponding environmental conditions. Using the random forest models based on the corrosion data of three different atmospheric environments, the environmental factors were proved to have different importance sequence in determining the environmental corrosivity of open and sheltered exposure test conditions. For each exposure test site, the importance of environmental features to the corrosion rate is also ranked and analyzed. Additionally, the feasibility of the random forest model to predict the corrosion rate of steel samples in the new environment is also demonstrated. The volume and representativeness of the corrosion data in the training data are considered to be the critical factors in determining its prediction performance. The above results prove that machine learning provides a useful tool for the analysis of atmospheric corrosion mechanisms and the evaluation of corrosion resistance.