The localization of deformation in shear bands is a fundamental phenomenon in granular materials like soil. In this study, we focus on the characteristics of shear bands, particularly the size effect, by implementing biaxial discrete element method (DEM) modeling. Firstly, we describe the establishment of the biaxial experimental model with dense sands. Then, we implement analyses of specimens with different sizes and find that there is a clear size effect in the stress–strain curve after the peak strength point, and there is less of a size effect in the angle of the shear band; the angle is consistent with Arthur’s theory. Finally, the reason for the size effect is analyzed using the width of the shear band and the porosity inside the shear band. As the specimen size increases, the ratio between the shear band area and the whole specimen decreases. This effect reduces as the isotropic confining stress increases. The difference in the proportion of the shear band area mainly causes the size effect that affects the specimen deformation characteristics. We also find that with the increase in isotropic confining stress, the type of shear band gradually changes from cross-type to single-type. Our study provides valuable insights into understanding the behavior of granular materials.