The shape of loess particles was determined from scanning electron microscope images and biaxial tests were simulated by the discrete element method. The effects of different percentages of angular, sub-angular, sub-rounded, rounded and well-rounded particles in the samples on the internal friction angle, coordination number and porosity of the loess are studied, and the evolution of the numerical simulation results during the tests are analysed from the microscopic level. The results show that when the combined roundness and combined ellipticity values decrease, that is, the irregular and flat particle percentage content decreases, the internal friction angle, the average coordination number between particles and the porosity of the sample decrease.