Recent studies have shown special spectral properties during the initial stage of flare emissions, such as the enhanced absorption in He I 10830 Å line and a strong redshift in Hα. Using the high-resolution imaging spectroscopic data obtained by the Interface Region Imaging Spectrograph (IRIS), we investigate the Mg II emission lines during an M6.5 flare (SOL2015-06-22T18:23), which was well covered by the joint observation of IRIS and the Goode Solar Telescope at Big Bear Solar Observatory. On the leading edge of the propagating ribbon, Mg II lines are characterized by blue-wing enhancement and strong broadening. On the other hand, redshifts in Mg II and Hα are found in the trailing areas of the flare ribbons. Numerical modeling, produced by combining RADYN and RH, suggests that the Mg II line broadening is possibly caused by unresolved turbulence with velocities about 10 to 30 km s-1. The enhanced blue wing is likely due to a decrease of temperature and an increase of electron density, as consequences of electron precipitation. Based on the observations and simulation results, we discuss the possible response of the lower atmosphere to the electron precipitation, in terms of the evolution of temperature, electron density, and turbulence velocities.