In cemented sand, the influences of the sampling factors (i.e., the curing time, cement–sand ratio, and initial void ratio) on the triaxial shear behavior were investigated using discrete element method. Cemented sand samples with different initial conditions were prepared and subjected to the consolidated drained triaxial shearing test. In the simulations, the peak strength, residual strength, and pre-peak stiffness of cemented sand were enhanced by increasing the curing time and cement–sand ratio, and the enhancements could be explained by the increases in bond strength and bond number. Resulting from the increases of these two sampling factors, bond breakage emerged at a greater axial strain but lower intensity. However, some uncommon phenomena were generated; that is, the contractive but strain-softening response occurred in the sample with a curing time of 3 days, and the shear band and the strain-hardening behavior coexisted in the sample with a cement–sand ratio of 1%. The peak strength and pre-peak stiffness were also enhanced by decreasing the initial void ratio, more distinctly than by increasing the curing time and cement–sand ratio. However, the residual strength, bond breakage, and failure pattern with the persistence of shear band were insensitive to this change.