Primary insomnia (PI) is associated with increased spontaneous neuronal activity. Transcutaneous auricular vagus nerve stimulation (taVNS) modulates brain function, and it is an effective treatment for primary insomnia. However, whether taVNS alleviates insomnia through modulating spontaneous neuronal activity is not fully clarified. This study aims to investigate the instant effect of taVNS in modulating spontaneous neuronal activity in PI patients using resting-state functional magnetic resonance imaging (rs-fMRI). Twenty-two PI subjects underwent rs-fMRI scanning prior and immediately after 30 min treatment of taVNS controlled by twenty healthy adults. Amplitude of low frequency fluctuations (ALFF) analysis was employed to assess the difference in spontaneous neuronal activity between PI patients and healthy adults, as well as between pre-treatment and post-treatment of taVNS. The taVNS-induced altered ALFF brain areas were then selected as regions of interest to perform the resting state functional connectivity (RSFC) analysis in PI patients. The right precuneus showed significantly increased ALFF in PI patients. After immediate taVNS treatment, the ALFF was significantly decreased in the right precuneus and increased in the left middle occipital gyrus. The RSFC in right precuneus with right angular, right superior frontal gyrus, and right middle frontal gyrus was significantly decreased. This study provides insights into the instant brain effects of taVNS on PI patients.