Neuropathic pain (NP) is a refractory disease in the clinic with a tremendous impact on the quality of life of patients. Gene therapy is a potential strategy for the management of NP. In the present study, we examined the analgesic effect and mechanism of hepatocyte growth factor (HGF) in vitro and in vivo. We examined the proinflammatroy gene changes in lipopolysaccharide (LPS)-induced microglia BV2 cells with a quantitative real-time polymerase chain reaction of interleukin (IL)-1β, IL-6, tumor necrosis factor (TNF)-α and inducible nitric oxide synthase (iNOS). Mechanical stimulation tests were performed five times at 5-min intervals to assess pain thresholds using Von Frey Hair in mice following spared nerve injury (SNI). The glial cell activation of spinal cord was examined by western blotting. Statistical significance was determined by a Tukey's test and a paired t-test. We found that recombinant human HGF protein suppressed LPS-induced BV2 cell activation in vitro, marked by the down-regulation of IL-1β, IL-6, TNF-α and iNOS expression, as well as decrease of nitric oxide production. Moreover, intrathecal injection of naked plasmid encoding HGF gene (pUDK-HGF) significantly attenuated SNI-induced pain behaviors in mice by direct inhibition of spinal cord microglia and astrocyte activation. The results of the present study indicate that pUDK-HGF can reduce cytotoxicity products released from activated glial cells, which may provide a promising therapeutic strategy for treating NP.