Drug distribution in cells is a fundamentally important, yet often overlooked, variable in drug efficacy. Many weakly basic anticancer agents accumulate extensively in the acidic lysosomes of normal cells through ion trapping. Lysosomal trapping reduces the activity of anticancer drugs, since anticancer drug targets are often localized in the cell cytosol or nucleus. Some cancer cells have defective acidification of lysosomes, which causes a redistribution of trapped drugs from the lysosomes to the cytosol. We have previously established that such differences in drug localization between normal and cancer cells can contribute to the apparent selectivity of weakly basic drugs to cancer cells in vitro. In this work, we tested whether this intracellular distribution-based drug selectivity could be optimized based on the acid dissociation constant (pKa) of the drug, which is one of the determinants of lysosomal sequestration capacity. We synthesized seven weakly basic structural analogs of the Hsp90 inhibitor geldanamycin (GDA) with pKa values ranging from 5 to 12. The selectivity of each analog was expressed by taking ratios of anti-proliferative IC(50) values of the inhibitors in normal fibroblasts to the IC(50) values in human leukemic HL-60 cells. Similar selectivity assessments were performed in a pair of cancer cell lines that differed in lysosomal pH as a result of siRNA-mediated alteration of vacuolar proton ATPase subunit expression. Optimal selectivity was observed for analogs with pKa values near 8. Similar trends were observed with commercial anticancer agents with varying weakly basic pKa values. These evaluations advance our understanding of how weakly basic properties can be optimized to achieve maximum anticancer drug selectivity towards cancer cells with defective lysosomal acidification in vitro. Additional in vivo studies are needed to examine the utility of this approach for enhancing selectivity.