Quantum mechanics hinders our ability to determine the state of a physical system in two ways: individual measurements provide only partial information about the observed system (because of Heisenberg uncertainty), and measurements are themselves invasive—meaning that little or no refinement is achieved by further observation of an already measured system1. Theoretical methods have been developed to maximize the information gained from a quantum measurement while also minimizing disturbance2, 3, 4, but laboratory implementation of optimal measurement procedures is often difficult. The standard class of operations considered in quantum information theory5 tends to rely on superposition-basis and entangled measurements6, which require high-fidelity implementation to be effective in the laboratory7. Here we demonstrate that real-time quantum feedback8, 9, 10 can be used in place of a delicate quantum superposition, often called a 'Schrödinger cat state', to implement an optimal quantum measurement for discriminating between optical coherent states11, 12. Our procedure actively manipulates the target system during the measurement process, and uses quantum feedback to modify the statistics of an otherwise sub-optimal operator to emulate the optimal cat-state measurement. We verify a long-standing theoretical prediction13 and demonstrate feedback-mediated quantum measurement10, 14 at its fundamental quantum limit over a non-trivial region of parameter space.