We investigated the elastoplastic behavior and strain localization of the Zigong sandstone (porosity: 6.5%) during brittle fracturing based on two series of axisymmetric compression experiments. The experiments were conducted under various confining pressures (σ3 = 0 ~ 80 MPa). For each confining pressure, the sandstone specimens were deformed under constant axial and circumferential strain rates, respectively. When σ3 < 60 MPa, the sandstone first undergoes stable deformation in the post-peak stage and then loses its stability. Before the emergence of instability, the mechanical behavior is hardly affected by the controlling method. When the confining is larger, the sandstone manifests a stable failure process during the whole loading stage. The observed elastoplastic behavior was described by a two-yield surface constitutive model established in the framework of generalized plastic mechanics. The proposed constitutive model incorporates two quadratic yield functions, as well as two linearly independent plastic potential functions, to honor the shear yield and volumetric dilatancy, respectively. Via the return mapping algorithm, the proposed constitutive model was verified by comparing the numerical results with experimental results. In addition, the two-yield surface constitutive model, which is equivalent to the model proposed by Rudnicki and Rice,1 was applied to localization analysis. Assuming that the onset of localization occurs at peak stress, frictional coefficient μ and dilatancy factor β were determined from experimental data. The variations of both plastic parameters predict the transition of localization mode from pure dilation bands under uniaxial compression to pure shear bands at high confining pressures, which is consistent with the experimental observations.