Humans have historically used soil as a material for flood control, irrigation purposes, burial sites, building foundations, and as construction material for buildings. First activities were linked to irrigation and flood control, as demonstrated by traces of dykes, dams, and canals dating back to at least 2000 BCE that were found in ancient Egypt, ancient Mesopotamia and the Fertile Crescent, as well as around the early settlements of Mohenjo Daro and Harappa in the Indus valley. As the cities expanded, structures were erected supported by formalized foundations; Ancient Greeks notably constructed pad footings and strip-and-raft foundations. Until the 18th century, however, no theoretical basis for soil design had been developed and the discipline was more of an art than a science, relying on past experience.

Several foundation-related engineering problems, such as the Leaning Tower of Pisa, prompted scientists to begin taking a more scientific-based approach to examining the subsurface. The earliest advances occurred in the development of earth pressure theories for the construction of retaining walls. Henri Gautier, a French Royal Engineer, recognized the "natural slope" of different soils in 1717, an idea later known as the soil's angle of repose. A rudimentary soil classification system was also developed based on a material's unit weight, which is no longer considered a good indication of soil type.[

In the 19th century Henry Darcy developed what is now known as Darcy's Law describing the flow of fluids in porous media. Joseph Boussinesq (a mathematician and physicist) developed theories of stress distribution in elastic solids that proved useful for estimating stresses at depth in the ground; William Rankine, an engineer and physicist, developed an alternative to Coulomb's earth pressure theory. Albert Atterberg developed the clay consistency indices that are still used today for soil classification.[3][4] Osborne Reynolds recognized in 1885 that shearing causes volumetric dilation of dense and contraction of loose granular materials.

Modern geotechnical engineering is said to have begun in 1925 with the publication of Erdbaumechanik by Karl Terzaghi (a civil engineer and geologist). Considered by many to be the father of modern soil mechanics and geotechnical engineering, Terzaghi developed the principle of effective stress, and demonstrated that the shear strength of soil is controlled by effective stress. Terzaghi also developed the framework for theories of bearing capacity of foundations, and the theory for prediction of the rate of settlement of clay layers due to consolidation.In his 1948 book, Donald Taylor recognized that interlocking and dilation of densely packed particles contributed to the peak strength of a soil. The interrelationships between volume change behavior (dilation, contraction, and consolidation) and shearing behavior were all connected via the theory of plasticity using critical state soil mechanics by Roscoe, Schofield, and Wroth with the publication of "On the Yielding of Soils" in 1958. Critical state soil mechanics is the basis for many contemporary advanced constitutive models describing the behavior of soil.