Using a coupled large-eddy simulation–land surface model framework, the impact of two-dimensional soil moisture heterogeneity on the cloudy boundary layer under varied free-atmosphere stabilities is investigated. Specifically, the impacts of soil moisture heterogeneity length scale and heterogeneity in terms of soil moisture gradients on micrometeorological states, surface fluxes, boundary layer characteristics, and cloud development are examined. The results show that mesoscale circulations due to surface heterogeneity in soil moisture play an important role in transferring water vapour within the boundary layer and in regulating cloud distribution at the entrainment zone, which, in turn, provides feedbacks on boundary layer/surface energy budgets. The initial domain-averaged soil moisture is identical for all homogenous and heterogeneous cases; however, the soil moisture heterogeneity in gradient and length scale between dry and wet regions has a significant impact on the estimates of near-surface micrometeorological properties and surface fluxes, which further affect the boundary layer states and characteristics. Both liquid water potential temperature and liquid water mixing ratio increase with an increasing soil moisture gradient, whereas the amount of specific humidity decreases. Heterogeneity length scale and free atmosphere stability also amplify these impacts on the boundary layer structure and cloud formation. In a low atmospheric stability condition that potentially allows for a deeper boundary layer and a higher entrainment rate, cloud base height and cloud thickness significantly increase as the soil moisture gradient and length scale increase. Analysis to differentiate the influences of surface heterogeneity type (i.e. length scale vs gradient) shows that in general soil moisture gradient provides a larger impact than heterogeneity length scale, although the heterogeneity length scale is large enough to initiate circulation features responsible for differences in the coupled system between homogeneous and heterogeneous soil moisture cases. Copyright © 2012 John Wiley & Sons, Ltd.