Meteorites record processes that occurred before and during the formation of the Solar System in the form of nucleosynthetic anomalies: isotopic compositions that differ from the Solar System patterns. Nucleosynthetic anomalies are rarely seen in volatile elements such as potassium at bulk meteorite scale. We measured potassium isotope ratios in 32 meteorites and identified nucleosynthetic anomalies in the isotope potassium-40. The anomalies are larger and more variable in carbonaceous chondrite (CC) meteorites than in noncarbonaceous (NC) meteorites, indicating that CCs inherited more material produced in supernova nucleosynthesis. The potassium-40 anomaly of Earth is close to that of the NCs, implying that Earth's potassium was mostly delivered by NCs.