Quantum systems exhibit particle- or wavelike behavior depending on the experimental apparatus they are confronted by. This wave-particle duality is at the heart of quantum mechanics. Its paradoxical nature is best captured in the delayed-choice thought experiment, in which a photon is forced to choose a behavior before the observer decides what to measure. Here, we report on a quantum delayed-choice experiment in which both particle and wave behaviors are investigated simultaneously. The genuinely quantum nature of the photon’s behavior is certified via nonlocality, which here replaces the delayed choice of the observer in the original experiment. We observed strong nonlocal correlations, which show that the photon must simultaneously behave both as a particle and as a wave.