Previous studies on the hollow cylinder torsional shear test (HCTST) have mainly focused on the macroscopic behavior, while the micromechanical responses in soil specimens with shaped particles have rarely been investigated. This paper develops a numerical model of the HCTST using the discrete element method (DEM). The method of bonded spheres in a hexagonal arrangement is proposed to generate flexible boundaries that can achieve real-time adjustment of the internal and external cell pressures and capture the inhomogeneous deformation in the radial direction during shearing. Representative angular particles are selected from Toyoura sand and reproduced in this model to approximate real sand particles. The model is then validated by comparing numerical and experimental results of HCTSTs on Toyoura sand with different major principal stress directions. Next, a series of HCTSTs with different combinations of major principal stress direction (α) and intermediate principal stress ratio (b) is simulated to quantitatively characterize the sand behavior under different shear conditions. The results show that the shaped particles are horizontally distributed before shearing, and the initial anisotropic packing structure further results in different stress–strain curves in cases with different α and b values. The distribution of force chains is affected by both α and b during the shear process, together with the formation of the shear bands in different patterns. The contact normal anisotropy and contact force anisotropy show different evolution patterns when either α or b varies, resulting in the differences in the non-coaxiality and other macroscopic responses. This study improves the understanding of the macroscopic response of sand from a microscopic perspective and provides valuable insights for the constitutive modeling of sand.