We reported the first glitch of PSR B2021+51 detected with the Shanghai Tian Ma Radio Telescope that occurred around MJD 58289.1 (2018 June 20). The spin frequency and its derivative suffered a jump of about 7.04 x 10(-10) Hz and 2.6 x 10(-18) s(-2), respectively. The pulse width at the 10% intensity level (W (10)) of the mean pulse profile significantly decreased right before the glitch and then increased after the glitch, accompanied by an enhancement in the trailing peak of the normalized profile. The mean pulse profiles were decomposed into three Gaussian components, i.e., C1, C2, and C3 from left to right by peak phase. The width of C3 (w (3)) had an apparent maximum right before the glitch and its weighted mean value became slightly smaller than the pre-glitch value after the glitch, while the weighted mean values of both w (1) and w (2) had no apparent change. The significant decrease of the mean pulse width right before the glitch is mainly due to the movement of C3 toward C1 and C2, while the increase of the mean pulse width after the glitch results from the movement of C2 toward C3. Changes in the widths of mean pulse profiles and in the widths and phase separations of Gaussian components associated with the glitch convinced us of a connection between the changes in characteristics of the pulsar emission zone and the glitch activity. We discuss a possible interpretation invoking the movements of flux tubes in the emission zone.