This book is compiled in accordance with the current national norms, procedures and standards, and is compiled in conjunction with engineering practice. The book is divided into two parts: soil mechanics and rock mechanics. The soil mechanics part includes 5 chapters, which mainly introduces the physical properties and engineering classification of soil, the calculation of stress and settlement in soil, the shear strength of soil and the bearing capacity of soil, and the calculation of earth pressure; the rock mass mechanics includes 6 chapters, which mainly introduces the basic geological characteristics and physical and mechanical properties of rock blocks, structural planes and rock masses, the natural stress of rock masses, surrounding rock pressure and stability and other basic theories and their application in underground engineering, slope engineering and foundation engineering. There are reflection questions and exercises at the end of each chapter for students to review.