Phase competition underlies many remarkable and technologically important phenomena in transition metal oxides. Vanadium dioxide (VO2) exhibits a first-order metal–insulator transition (MIT) near room temperature, where conductivity is suppressed and the lattice changes from tetragonal to monoclinic on cooling. Ongoing attempts to explain this coupled structural and electronic transition begin with two alternative starting points: a Peierls MIT driven by instabilities in electron–lattice dynamics and a Mott MIT where strong electron–electron correlations drive charge localization1, 2, 3, 4, 5, 6, 7, 8, 9, 10. A key missing piece of the VO2 puzzle is the role of lattice vibrations. Moreover, a comprehensive thermodynamic treatment must integrate both entropic and energetic aspects of the transition. Here we report that the entropy driving the MIT in VO2 is dominated by strongly anharmonic phonons rather than electronic contributions, and provide a direct determination of phonon dispersions. Our ab initio calculations identify softer bonding in the tetragonal phase, relative to the monoclinic phase, as the origin of the large vibrational entropy stabilizing the metallic rutile phase. They further reveal how a balance between higher entropy in the metal and orbital-driven lower energy in the insulator fully describes the thermodynamic forces controlling the MIT. Our study illustrates the critical role of anharmonic lattice dynamics in metal oxide phase competition, and provides guidance for the predictive design of new materials.