We present a measurement of the spatial clustering of massive compact galaxies at 1.2 \leq z \leq 3 in CANDELS/3D-HST fields . We obtain the correlation length for compact quiescent galaxies ( cQGs ) at z \sim 1.6 of r _ { 0 } = 7.1 _ { -2.6 } ^ { +2.3 } h ^ { -1 } Mpc and compact star forming galaxies ( cSFGs ) at z \sim 2.5 of r _ { 0 } = 7.7 _ { -2.9 } ^ { +2.7 } h ^ { -1 } Mpc assuming a power-law slope \gamma = 1.8 . The characteristic dark matter halo masses M _ { H } of cQGs at z \sim 1.6 and cSFGs at z \sim 2.5 are \sim 7.1 \times 10 ^ { 12 } h ^ { -1 } M _ { \odot } and \sim 4.4 \times 10 ^ { 12 } h ^ { -1 } M _ { \odot } , respectively . Our clustering result suggests that cQGs at z \sim 1.6 are possibly the progenitors of local luminous ETGs and the descendants of cSFGs and SMGs at z > 2 . Thus an evolutionary connection involving SMGs , cSFGs , QSOs , cQGs and local luminous ETGs has been indicated by our clustering result .