In this study, a test technique that enables continuous control of the sample stress state from freezing to testing is proposed to investigate the influence of freezing pressure on the mechanical properties of ice under uniaxial compression. In this method, the water is frozen into the standard cylindrical ice specimen under high hydraulic pressure in a triaxial pressure chamber, and then, the temperature field and stress field of the ice specimens are adjusted to the initial state of the test; finally, an in situ mechanical test is conducted in the triaxial chamber. The uniaxial compression test of ice specimens with temperature of −20°C and freezing pressure of 0.5–30 MPa is performed in the strain rate range of 5 × 10−5−1.5 × 10−6 s−1. The results show that, as the freezing pressure increases, the ductile-to-brittle transition zone of the ice specimen during failure moves to the low strain rate range, and the failure mode of the specimen changes from shear failure to splitting failure. Further, the brittleness index of the ice specimen first increases, then decreases, and then again increases with the increase in freezing pressure. The brittleness index reaches the maximum (minimum) when the freezing pressure is 30 MPa (20 MPa). The peak stress of the ice specimen also increases first, then decreases, and then increases with the increase in freezing pressure. The maximum value is also at the freezing pressure of 30 MPa, but the minimum value is obtained at the freezing pressure of 0.5 MPa. The failure strain of the ice specimen first decreases and then increases with the increase in freezing pressure, and the maximum (minimum) value is achieved at the freezing pressure of 0.5 MPa (10 MPa). When the ice specimen exhibits brittle failure, the relationships between the residual stress and the freezing pressure and between the peak stress and freezing pressure are the same, but when the ice specimen exhibits ductile failure, there is no obvious relationship between the residual stress and the freezing pressure.