Accurate modeling and design of protein-ligand interactions have broad applications in cell, synthetic biology and drug discovery but remain challenging without experimental protein structures. Here we developed an integrated protein homology modeling-ligand docking-protein design approach that reconstructs protein-ligand binding sites from homolog protein structures in the presence of protein-bound ligand poses to capture conformational selection and induced fit modes of ligand binding. In structure modeling tests, we blindly predicted near-atomic accuracy ligand conformations bound to G protein-coupled receptors (GPCRs) that were rarely identified by traditional approaches. We also quantitatively predicted the binding selectivity of diverse ligands to structurally-uncharacterized GPCRs. We then applied the technique to design functional human dopamine receptors with novel ligand binding selectivity. Most blindly predicted ligand binding specificities closely agreed with experimental validations. Our method should prove useful in ligand discovery approaches and in reprogramming the ligand binding profile of membrane receptors that remain difficult to crystallize.