Spatial heterogeneity in composition and organisation of the primary cell wall affects the mechanics of cellular morphogenesis. However, directly correlating cell wall composition, organisation and mechanics has been challenging. To overcome this barrier, we applied atomic force microscopy coupled with infrared (AFM-IR) spectroscopy to generate spatially correlated maps of chemical and mechanical properties for paraformaldehyde-fixed, intact Arabidopsis thaliana epidermal cell walls. AFM-IR spectra were deconvoluted by non-negative matrix factorisation (NMF) into a linear combination of IR spectral factors representing sets of chemical groups comprising different cell wall components. This approach enables quantification of chemical composition from IR spectral signatures and visualisation of chemical heterogeneity at nanometer resolution. Cross-correlation analysis of the spatial distribution of NMFs and mechanical properties suggests that the carbohydrate composition of cell wall junctions correlates with increased local stiffness. Together, our work establishes new methodology to use AFM-IR for the mechanochemical analysis of intact plant primary cell walls.