Transcutaneous electrical nerve stimulation (TENS) has been used to treat chronic pain. However, the potential efficacy and mechanism of the effect of applying TENS for a short time in chronic pain patients remains unclear. To identify the effect of short-term TENS on chronic pain patients and to clarify the mechanism of the effect, we investigated abnormalities of functional connectivity (FC) within the prefrontal cortex (PFC) using resting-state functional near-infrared spectroscopy (rs-fNIRS). Fifteen patients (56.8 ± 17.4 years, nine females) with chronic pain participated in this rs-fNIRS study. The fNIRS scans included two parts: a 5-minute resting-state scan followed by a 5-minute scan during TENS (150 Hz) application. The pain intensity was measured using a Visual Analog Scale (VAS) and Pittsburgh Sleep Quality Index (PSQI). The spontaneous brain activity of the PFC and resting-state functional connectivity (rsFC) in the PFC were examined during TENS and compared to before TENS. The results showed that Pain intensity significantly decreased after TENS (p textless 0.001). During TENS, fALFF values were significantly lower in BA46 (**p = 0.0025) and BA45 (**p = 0.0056). rsFC strength increased during TENS compared to before, with significant group-level increases in BA10, BA9, BA46, and BA44/45 (p textless 0.05). Notably, the variation between BA10 and BA44/45 was highly significant (***p textless 0.001). These findings suggest that FC between BA10 and BA44/45 was associated with analgesia of TENS in patients with chronic pain, indicating the potential role of FC as a novel objective parameter to predict the outcome of clinical use of TENS for pain relief in chronic pain patients.