The invention discloses a universal simulation box used for three-dimensional discrete element modeling and simulation of a rock and soil mass. 1) a universal simulation box is established, specified-size boundary plates in six directions of a box body are generated, the boundary plates are composed of a series of sphere particles, smaller-size buffer boundary pressure plates are respectively generated inside the six boundary plates, and the three-dimensional simulation box is established; 2) a particle accumulation body is generated in the box body, and no-gravity particles are randomly generated in the box body; 3) a three-dimensional model of different structures is established, files including delamination and demarcation coordinate files are imported, the particles outside an outlineare removed, and the three-dimensional model of the structures is formed; 4) material properties of the rock and soil mass are assigned to the three-dimensional model, a material attribute file of therock and soil mass is imported, parameters of the rock and soil mass are converted into parameters of the particles according to conversion formulas, the parameters are assigned to the particles, anda three-dimensional discrete element model with specified elastic properties and failure properties is established; and 5) loading of force, displacement and vibration is carried out through the boundary pressure plates, displacement and vibration are applied through boundaries, loads such as stress action are applied through the pressure plates, iteration operating is carried out, and a result is output.