Molecular self-assembly, the function of biomembranes and the performance of organic solar cells rely on nanoscale molecular interactions. Understanding and control of such materials have been impeded by difficulties in imaging their properties with the desired nanometre spatial resolution, attomolar sensitivity and intermolecular spectroscopic specificity. Here we implement vibrational scattering-scanning near-field optical microscopy with high spectral precision to investigate the structure-function relationship in nano-phase separated block copolymers. A vibrational resonance is used as a sensitive reporter of the local chemical environment and we image, with few nanometre spatial resolution and 0.2 cm(-1) spectral precision, solvatochromic Stark shifts and line broadening correlated with molecular-scale morphologies. We discriminate local variations in electric fields between nano-domains with quantitative agreement with dielectric continuum models. This ability to directly resolve nanoscale morphology and associated intermolecular interactions can form a basis for the systematic control of functionality in multicomponent soft matter systems.