An imbalance in the various T lymphocytes, including T-helper (Th)1, Th2 and Th17 cells, and regulatory T (Treg) cells, has been associated with immune dysfunction, and may occur following thoracotomy of patients with lung cancer. The use of transcutaneous acupoint electrical stimulation (TAES) has previously been demonstrated to exert immunoregulatory effects; therefore, the present study aimed to evaluate whether TAES was able to attenuate postoperative immune suppression in patients with lung cancer. Thoracic surgical patients with lung cancer (n=27) underwent TAES (frequency, 2/100 Hz; intensity, 4-12 mA) at the bilateral large intestine 4, pericardium 6, small intestine 3 and San Jiao 6 acupuncture points for 30 min, prior to incision, and at 20, 44, 68, 92 and 116 h following thoracotomy. The number of Th1, Th2, Th17 and Treg cells, and the protein and mRNA expression levels of related cytokines were measured by flow cytometry, ELISA and polymerase chain reaction, respectively. The balance of Th1, Th2, Th17 and Treg cells in the peripheral blood of patients with lung cancer was disrupted following thoracotomy. TAES administration increased the percentage of Th1 and Th17 cells, the protein expression levels of interleukin (IL)-2 and interferon-γ, the mRNA expression levels of T-bet and RAR-related orphan receptor-γt, and decreased the percentage of Th2 cells, IL-10 protein expression levels, and GATA binding protein 3 mRNA expression levels. The results of the present study demonstrated that TAES was able to partially attenuate the postoperative immune depression of patients with lung cancer, by regulating the balance of Th1, Th2, Th17 and Treg cells, and the expression levels of related cytokines and transcription factors; therefore, TAES may be considered to be a promising strategy for treating postoperative immune dysfunction in patients with lung cancer.