Ten-year measurements of lightning and relative humidity from 2002 - 2011 have been analyzed in the Nanjing city, China. Statistical analysis shows the lightning density is positively correlated to relative humidity during this period. To further investigate the effect of relative humidity on electrification and lightning discharges in thunderstorms, a two-dimensional cumulus model incorporating dynamics, microphysics, and thunderstorm electrification mechanisms is used to present a sensitive study. The results show that the higher relative humidity in surface leads to more cloud droplet and stronger updraft, because of enhanced latent heat releasing from increasing condensation. Greater updraft and cloud water content primarily contribute to stronger ice crystal and graupel particles production with increasing relative humidity. A greater formation of cloud droplet, graupel and ice crystal result in increasing charge separation via non-inductive and inductive mechanism. The total lightning flashes increase as the relative humidity increase from 60 - 90%, and only tests with high relative humidity of 90% can produce negative cloud to ground (CG) flashes and positive CG flashes. In addition, the increase of relative humidity condition generally leads to a quicker and stronger convection, which results in earlier electrification and lightning discharges in thunderstorm.