Dense wavelength-division multiplexing is conceived as an appropriate solution for the 5G fronthaul system to cope with the rapidly increasing demand for bandwidth. While the cross-phase modulation (XPM) would appear when the signals are transmitted simultaneously in the single-mode fiber. The XPM effect on the 5G fronthaul wavelengths is investigated through both simulation and experimental campaigns. Simulation results show that the electrical spectrum crosstalk will occur with the wavelengths transmitting synchronously, when the channel spacing is 100 GHz and the speed is 25 Gbit / s per channel in the 10-km link. Also, the intensity of the electrical spectrum crosstalk becomes stronger when the launch power increases from 10 until 14 dBm. While comparing with the results obtained from the positive-intrinsic-negative (PIN) detector, the XPM-induced sensitivity penalty can be alleviated by 0.3 dB in use of avalanche photodiode (APD), which can provide higher signal-to-noise ratio. Consistent with the simulation results, the electrical spectrum crosstalk also appears in the experimental campaign under the same conditions. Furthermore, a sensitivity improvement of 0.5 dB is obtained using 25-GHz APD receiver, compared with the adoption of 35-GHz PIN receiver case.