The present invention provides a heterocyclic compound with CXCR4 signaling pathway inhibitory activity and its pharmaceutically acceptable salt, isotope, isomer and crystal structure. The compound has the structure shown in general formula I: the present invention also The application of the above-mentioned heterocyclic compound having CXCR4 signaling pathway inhibitory activity is provided. The heterocyclic compound having CXCR4 signaling pathway inhibitory activity of the present invention, as an effective antagonist of CXCR4 signaling pathway, can be used to treat or prevent diseases that respond to CXCR4 receptor antagonism.