The invention belongs to the technical field of testing mechanical properties of rocks, and discloses a system and a method for testing and controlling the mechanical properties of the rocks under a complicated condition. The system for testing and controlling the mechanical properties of the rocks under the complicated condition comprises a hardness detecting module, a tension detecting module, apressure detecting module, a temperature-humidity detecting module, a main control module, a density measuring module, a rock phase analysis module, a data storage module and a display module. According to the system for testing and controlling the mechanical properties of the rocks under the complicated condition, disclosed by the invention, a rock sample can be constructed into a cylinder of which the volume can be conveniently obtained through the density measuring module, the axial size and the radial size of the rock sample can be changed by respectively applying pressure to the top surface, the bottom surface and the side surface of the rock sample, and the heated and pressurized rock sample still is the cylinder, so that the volume of the heated and pressurized rock sample can be obtained, and measurement of rock density can be convenient; meanwhile, fine laminating of a big, very thick and single shale layer section can be rapidly solved through the rock phase analysis module.