In order to effectively predict the failure probability and residual life of carbon steel pipe system with pitting corrosion, a method for calculating the failure probability of carbon steel pipe system varying with time is introduced. This method can be used to judge whether the carbon steel pipe with pitting corrosion needs to be repaired or replaced. Based on the time-varying reliability analysis method and the first crossing probability theory, the stochastic failure probability model of carbon steel pipe with pitting corrosion is established by introducing stochastic parameters into the residual strength calculation of carbon steel pipe with pitting corrosion. The model quantifies the failure probability caused by pitting corrosion and provides a theoretical basis for determining the failure time of carbon steel pipe system scientifically. The feasibility of this model is verified by Monte Carlo simulation with an example, and the key factors affecting the failure of carbon steel pipe system with pitting corrosion are identified through the analysis of relevant parameters. The results show that the model can reasonably predict the failure probability of carbon steel pipes with pitting corrosion and help the managers to determine the best time for maintenance and repairment of carbon steel pipe systems.