Different guided wave mode has different sensitivity to the defects of rail head, rail web and rail base in the detection of rail defects using ultrasonic guided wave. A novel guided wave mode selection and excitation method is proposed, which is effective for detection and positioning of the three parts of rail defects. Firstly, the mode shape data in a CHN60 rail is obtained at the frequency of 35 kHz based on SAFE method. The guided wave modes are selected, combining the strain energy distribution diagrams with the phase velocity dispersion curves of modes, which are sensitive to the defects of the rail head, rail web and rail base. Then, the optimal excitation direction and excitation node of the modes are calculated with the mode shape matrix. Phase control and time delay technology are employed to achieve the expected modes enhancement and interferential modes suppression. Finally, ANSYS is used to excite the specific modes and detect defects in different rail parts to validate the proposed methods. The results show that the expected modes are well acquired. The selected specific modes are sensitive to the defects of different positions and the positioning error is small enough for the maintenance staff to accept.