In dual-polarized channel, the BER performance of polarization modulation (PM) can be decreased by cross-polarization discrimination (XPD) effect which can introduce cross power leakage. Therefore, a XPD compensation algorithm for PM is proposed. Based on the analyses about the effect of XPD on PM, the compensation factor is obtained by the channel state information. Then by compensating the state of polarization of the received signals, the cross power leakage between two orthogonal components of the states of polarization is mitigated, and the constellation distortion of PM is reduced. The analyses reveal that the compensation algorithm can effectively improve the BER performance of PM affected by XPD. Finally, simulation results show that when the XPD is a definite value, to achieve equivalent BER performance of 2PM, the SNR needed is 2.5dB reduction after compensation.