Compared with atoms, molecules have a rich internal structure that offers many opportunities for technological and scientific advancement. The study of this structure could yield critical insights into quantum chemistry1,2,3, new methods for manipulating quantum information4,5, and improved tests of discrete symmetry violation6,7and fundamental constant variation8,9,10. Harnessing this potential typically requires the preparation of cold molecules in their quantum rovibrational ground state. However, the molecular internal structure severely complicates efforts to produce such samples. Removal of energy stored in long-lived vibrational levels is particularly problematic because optical transitions between vibrational levels are not governed by strict selection rules, which makes laser cooling difficult. Additionally, traditional collisional, or sympathetic, cooling methods are inefficient at quenching molecular vibrational motion11. Here we experimentally demonstrate that the vibrational motion of trapped BaCl+ molecules is quenched by collisions with ultracold calcium atoms at a rate comparable to the classical scattering, or Langevin, rate. This is over four orders of magnitude more efficient than traditional sympathetic cooling schemes11. The high cooling rate, a consequence of a strong interaction potential (due to the high polarizability of calcium), along with the low collision energies involved12, leads to molecular samples with a vibrational ground-state occupancy of at least 90 per cent. Our demonstration uses a novel thermometry technique that relies on relative photodissociation yields. Although the decrease in vibrational temperature is modest, with straightforward improvements it should be possible to produce molecular samples with a vibrational ground-state occupancy greater than 99 per cent in less than 100 milliseconds. Because sympathetic cooling of molecular rotational motion is much more efficient than vibrational cooling in traditional systems, we expect that the method also allows efficient cooling of the rotational motion of the molecules. Moreover, the technique should work for many different combinations of ultracold atoms and molecules.