Chondrites display isotopic variations for moderately volatile elements, the origin of which is uncertain and could have involved evaporation/condensation processes in the protoplanetary disk, incomplete mixing of the products of stellar nucleosynthesis, or aqueous alteration on parent bodies. Here, we report high-precision K and Rb isotopic data of carbonaceous chondrites, providing new insights into the cause of these isotopic variations. We find that the K and Rb isotopic compositions of carbonaceous chondrites correlate with their abundance depletions, the fractions of matrix material, and previously measured Te and Zn isotopic compositions. These correlations are best explained by the variable contribution of chondrules that experienced incomplete condensation from a supersaturated medium. From the data, we calculate an average chondrule cooling rate of ~560 ± 180 K/hour, which agrees with values constrained from chondrule textures and could be produced in shocks induced by nebular gravitational instability or motion of large planetesimals through the nebula.