The dopamine D3 receptor (D3R) has been implicated in substance abuse and other neuropsychiatric disorders. The high sequence homology between the D3R and D2R, especially within the orthosteric binding site (OBS) that binds dopamine, has made the development of D3R-selective compounds challenging. Here, we deconstruct into pharmacophoric elements a series of D3R-selective substituted-4-phenylpiperazine compounds and use computational simulations and binding and activation studies to dissect the structural bases for D3R selectivity and efficacy. We find that selectivity arises from divergent interactions within a second binding pocket (SBP) separate from the OBS, whereas efficacy depends on the binding mode in the OBS. Our findings reveal structural features of the receptor that are critical to selectivity and efficacy that can be used to design highly D3R-selective ligands with targeted efficacies. These findings are generalizable to other GPCRs in which the SBP can be targeted by bitopic or allosteric ligands.