Several studies have addressed the expression of transient receptor potential vanilloid subfamily 1(TRPV1) playing an important role in the generation of cancer pain. Electroacupuncture (EA) is an effective method of acupuncture shown to attenuate different kinds of pain such as inflammatory, neuropathic, and cancer. In this study, we investigated the effect of EA on cancer pain caused by intraplantar injection of Walker 256 carcinoma cells and cancer-driven TRPV1 expression in the dorsal root ganglions (DRGs). Rats were randomly divided into 4 groups: the nontumor cell inoculation group (normal control, n = 8); Walker 256 carcinoma cell inoculation group (tumor control, n = 8); sham point electrical stimulation treatment with Walker 256 carcinoma cell inoculation group (SES, n = 8); EA treatment with Walker 256 carcinoma cell inoculation group (EA, n = 8). The time courses of thermal, mechanical sensitivity, and spontaneous nocifensive behavior were determined. In addition, TRPV1 expression in DRGs was observed by quantitative real-time polymerase chain reaction and Western blotting. Injection of cancer cells decreased the paw withdrawal threshold, increased spontaneous nocifensive behavior, and induced significant thermal hyperalgesia that was attenuated by EA at the ST36 acupoint (2 Hz, 0.3 ms, ≤1 mA). TRPV1 mRNA and protein in DRGs were upregulated in the cancer pain model, and EA at ST36 acupoint counteracted the cancer-driven upregulation of TRPV1 expression in the corresponding DRGs. EA at ST36 could attenuate cancer-induced pain, at least in part, through suppressing TRPV1 mRNA and protein upregulation in the DRGs.