Purpose We aimed to investigate alterations in the topological organization of functional brain networks in acute pain. Methods A total of 29 capsaicin group (CAP) and 19 sham controls (Sham) underwent a 10-min resting-state functional near-infrared spectroscopy scan. The CAP group applied capsaicin cream (0.1%) to the lower back, whereas the Sham group applied a hand cream without capsaicin ingredients to the same area. All subjects were healthy individuals prior to the experiment and did not report any pain or other medical history. The pain in the CAP was only caused by the topical application of capsaicin. Each subject was asked to complete a numerical rating scale. Graph theory–based analysis was used to construct functional connectivity (FC) matrices and extract the features of small-world networks of the brain in both groups. Then, FC differences in the prefrontal cortex were characterized by statistical analysis, and the altered brain features were explored. Results Compared with Sham, CAP had impaired functions in short- and long-distance connectivity ( p textless 0.05 ). In particular, there was a greatly significant difference in connectivity associated with the left dorsolateral prefrontal cortex (ldlpfc) (CAP versus Sham: 0.80 ± 0.02 versus 0.70 ± 0.05 , p textless 0.0001 ). Global efficiency, local efficiency, and small worldness were significantly lower in the topological parameters in CAP than in Sham (CAP versus Sham: 0.172 ± 0.018 versus 0.191 ± 0.015 , t = 3.758 , p = 0.0005 ; 0.253 ± 0.012 versus 0.283 ± 0.012 , t = 8.209 , p textless 0.0001 ; 0.526 ± 0.031 versus 0.628 ± 0.082 , t = 3.856 , p = 0.0009 ). At the regional level, there were deficits in nodal efficiency within the medial prefrontal cortex and ldlpfc (CAP versus Sham: 0.156 ± 0.081 versus 0.175 ± 0.067 , t = 2.305 , p = 0.0257 ; 0.169 ± 0.089 versus 0.156 ± 0.081 , t = 2.194 , p = 0.0033 ). Conclusions Even brief episodes of acute pain can significantly reshape the brain’s network architecture and FC, revealing a complex phenomenon beyond a transient sensory experience. Disruptions in brain network topology and connectivity due to pain suggest potential avenues for targeted therapeutic interventions and a reconfiguration of brain networks that could underlie chronic pain formation.