It is thought that KRAS oncoproteins are constitutively active because their guanosine triphosphatase (GTPase) activity is disabled. Consequently, drugs targeting the inactive or guanosine 5′-diphosphate-bound conformation are not expected to be effective. We describe a mechanism that enables such drugs to inhibit KRASG12C signaling and cancer cell growth. Inhibition requires intact GTPase activity and occurs because drug-bound KRASG12C is insusceptible to nucleotide exchange factors and thus trapped in its inactive state. Indeed, mutants completely lacking GTPase activity and those promoting exchange reduced the potency of the drug. Suppressing nucleotide exchange activity downstream of various tyrosine kinases enhanced KRASG12C inhibition, whereas its potentiation had the opposite effect. These findings reveal that KRASG12C undergoes nucleotide cycling in cancer cells and provide a basis for developing effective therapies to treat KRASG12C-driven cancers.