A fundamental step towards atomic- or molecular-scale spintronic devices has recently been made by demonstrating that the spin of an individual atom deposited on a surface, or of a small paramagnetic molecule embedded in a nanojunction, can be externally controlled. An appealing next step is the extension of such a capability to the field of information storage, by taking advantage of the magnetic bistability and rich quantum behaviour of single-molecule magnets (SMMs). Recently, a proof of concept that the magnetic memory effect is retained when SMMs are chemically anchored to a metallic surface was provided. However, control of the nanoscale organization of these complex systems is required for SMMs to be integrated into molecular spintronic devices. Here we show that a preferential orientation of Fe(4) complexes on a gold surface can be achieved by chemical tailoring. As a result, the most striking quantum feature of SMMs-their stepped hysteresis loop, which results from resonant quantum tunnelling of the magnetization-can be clearly detected using synchrotron-based spectroscopic techniques. With the aid of multiple theoretical approaches, we relate the angular dependence of the quantum tunnelling resonances to the adsorption geometry, and demonstrate that molecules predominantly lie with their easy axes close to the surface normal. Our findings prove that the quantum spin dynamics can be observed in SMMs chemically grafted to surfaces, and offer a tool to reveal the organization of matter at the nanoscale.