Microscale interactions in soil may give rise to highly localised conditions that disproportionally affect soil nitrogen transformations. We report mechanistic modelling of coupled biotic and abiotic processes during drying of soil surfaces and biocrusts. The model links localised microbial activity with pH variations within thin aqueous films that jointly enhance emissions of nitrous acid (HONO) and ammonia (NH3) during soil drying well above what would be predicted from mean hydration conditions and bulk soil pH. We compared model predictions with case studies in which reactive nitrogen gaseous fluxes from drying biocrusts were measured. Soil and biocrust drying rates affect HONO and NH3 emission dynamics. Additionally, we predict strong effects of atmospheric NH3 levels on reactive nitrogen gas losses. Laboratory measurements confirm the onset of microscale pH localisation and highlight the critical role of micro-environments in the resulting biogeochemical fluxes from terrestrial ecosystems.