Structural optimization of aminopyrimidine-based CXCR4 antagonists is reported. The optimization is guided by molecular docking studies based on available CXCR4-small molecule crystal complex. The optimization identifies a number of compounds with improved receptor binding affinity and functional activity exemplified by compound 23 (inhibition of APC-conjugate clone 12G5 for CXCR4 binding in a cell based assay: IC50 = 8.8 nM; inhibition of CXCL12 induced cytosolic calcium increase: IC50 = 0.02 nM). In addition, compound 23 potently inhibits CXCR4/CXLC12 mediated chemotaxis in a matrigel invasion assay. Furthermore, compound 23 exhibits good physicochemical properties (MW 367, clogP 2.1, PSA 48, pKa 7.2) and in vitro safety profiles (marginal/moderate inhibition of CYP isozymes and hERG). These results represent significant improvement over the initial hit from scaffold hybridization and suggest that compound 23 can be used as a starting point to support lead optimization.