An analytical solution of cavity expansion in two different concentric regions of soil is developed and investigated in this paper. The cavity is embedded within a soil with finite radial dimension and surrounded by a second soil, which extends to infinity. Large-strain quasi-static expansion of both spherical and cylindrical cavities in elastic-plastic soils is considered. A non-associated Mohr–Coulomb yield criterion is used for both soils. Closed-form solutions are derived, which provide the stress and strain fields during the expansion of the cavity from an initial to a final radius. The analytical solution is validated against finite element simulations, and the effect of varying geometric and material parameters is studied. The influence of the two different soils during cavity expansion is discussed by using pressure–expansion curves and by studying the development of plastic regions within the soils. The analytical method may be applied to various geotechnical problems, which involve aspects of soil layering, such as cone penetration test interpretation, ground-freezing around shafts, tunnelling, and mining. © 2014 The Authors. International Journal for Numerical and Analytical Methods in Geomechanics published by John Wiley & Sons Ltd.