Thin-walled circular tubes have been widely used in space lattice structures and other industrial areas. Steel tubes are prone to corrosion during their service life, significantly reducing their loading capacity and threatening the structural safety. This work aimed to investigate the residual moment capacity of corroded circular steel tubes (CSTs) subjected to compression force. The second-order effect of steel tubes was studied based on CSTs with outer diameter D = 100 mm. The effects of corrosion thickness, diameter of corrosion pit, and material strength on the residual moment capacity of CSTs were also investigated. The analytical formula with a second-order polynomial form was proposed for predicting the residual moment capacity of CSTs. The values of t(c)/t were assumed to be 0.1, 0.3, 0.5, and 0.7, and the values of F/F-u were set to 0, 0.5, and 0.7 to reveal the influence of corroded thickness with different axial compression ratios. The applicability of the proposed formula for CST with yield strength equal to 235, 345, and 460 MPa was also confirmed. According to the findings, the proposed analytical formula can accurately predict the residual moment capacity of CSTs with random pitting corrosion.