Phase-shifting transformers (PSTs) provide an economical solution to control the power flow in the electric grids. However, the PSTs vitiate the conventional protection system applied. This paper studies the impact of the delta-hexagonal phase-shifting transformer on the performance of the distance protection relays for the transmission lines. Modified distance protection formulas are derived for both phase and ground faults. The proposed method uses the local measurements at the relay point and does not require voltage or current measurements from a remote substation. Alternatively, the tap position of the phase-shifting transformer is the data needs to be shared between substations which can be accomplished using a simple communication method. The proposed method is evaluated on a simulated transmission line using MATLAB/Simulink packages. The results show the ability of the proposed method to compensate for the PST effect on the distance protection relays.