One of the hallmarks of quantum physics is the generation of non-classical quantum states and superpositions, which has been demonstrated in several quantum systems, including ions, solid-state qubits and photons. However, only indirect demonstrations of non-classical states have been achieved in mechanical systems, despite the scientific appeal and technical utility of such a capability1,2, including in quantum sensing, computation and communication applications. This is due in part to the highly linear response of most mechanical systems, which makes quantum operations difficult, as well as their characteristically low frequencies, which hinder access to the quantum ground state3-7. Here we demonstrate full quantum control of the mechanical state of a macroscale mechanical resonator. We strongly couple a surface acoustic-wave8 resonator to a superconducting qubit, using the qubit to control and measure quantum states in the mechanical resonator. We generate a non-classical superposition of the zero- and one-phonon Fock states and map this and other states using Wigner tomography9-14. Such precise, programmable quantum control is essential to a range of applications of surface acoustic waves in the quantum limit, including the coupling of disparate quantum systems15,16.