To understand the relationship between microscopic variables and macroscopic engineering properties of kaolinite particles, a molecular dynamics simulation of triaxial shear tests was developed. The calculations were based on a coarse-grained representation of kaolinite particles, considering the action of Derjaguin–Landau–Vervey–Overbeek forces and the granular interactions. The objective of this study was to provide an understanding of the micro- to macro-linkage of mechanical properties through the development of a versatile numerical framework to accurately duplicate the interactions between clay particles and to study the three-dimensional mechanical behaviour of granular matters. To understand the capabilities of the method, several computer simulations of the periodic true triaxial compression and extension tests of both isotropically and one-dimensionally consolidated specimens were carried out.