Global climate change has intensified the water cycle, leading to frequent extreme precipitation events, posing a significant threat to railway infrastructure and safety operations. Based on the analysis of past and future precipitation changes in China, this study investigates the impact of climate change on railway safety operations. The study reveals the following findings: (1) Under the influence of the intensified East Asian summer monsoon and the northward shift of the subtropical high during the 2017–2021 compared to the 2012–2016, precipitation has significantly decreased (120 mm) in the regions south of the Yangtze River and South China, while it has increased (60 mm) in the regions from the eastern of Northwest China to the middle and lower reaches of Yangtze River; The operational precipitation risk has decreased for Urumqi, Lanzhou, Qinghai-Tibet Group, Xi’an, and Wuhan railway bureaus (abbreviated as Bureau), while it has increased for Nanchang, Chengdu, Zhengzhou, Shanghai, and Shenyang Bureaus. Particularly noteworthy is that despite a decrease in total annual precipitation for Nanchang bureau (15.3 mm/a), the frequency of intense precipitation events has increased, leading to an increased operational precipitation risk. (2) During the 21st century, under high (SSP5-8.5), medium (SSP2-4.5), and low (SSP1-2.6) forcing scenarios, all projections indicate that most of the China will experience an increasing trend in precipitation, with significant increases in precipitation observed in the regions south of the Yangtze Rive, South and Southwest China. The higher the greenhouse gas emissions, the more pronounced the increasing trend in precipitation. (3) Compared to the 20th century, under high (SSP5-8.5), medium (SSP2-4.5), and low (SSP1-2.6) forcing scenarios, all projections indicate that the total annual precipitation hours, railway inspection, speed limit, and closure risk hours have all increased on a national scale during the 21st century. The operational precipitation risk for railways has also increased. The higher the alert level for railway precipitation (precipitation < inspection < speed limit < closure), the higher the proportion of risk hours compared to the 20th century. By the late 21st century, the railway inspection, speed limit, and closure risk hours have increased by 175%, 463%, and 647%, respectively, compared to the 20th century.