The detection of pharmaceuticals has been a matter of concern among scientists and health researchers in the past few decades. However, it is still difficult to realize the sensitivity and selectivity detection of pharmaceuticals with similar structures. Herein, the pharmaceutical molecules of 2-mercaptobenzimidazole (MBI) and 2-mercaptobenzothiazole (MBT) with so similar structures can be selectively detected by surface-enhanced Raman spectroscopy (SERS) taking advantage of the fingerprint identification on Au/MIL-101(Cr), with sensitive detection limits of 0.5 ng·mL–1 for MBI and 1 ng·mL–1 for MBT. MBI is selectively enriched by Au/MIL-101(Cr) from the mixture solution and detected by SERS below 30 ng·mL–1. MBI can also be selectively detected in the serum samples with a detection limit of 10 ng·mL–1. Density functional theory calculations combined with the SERS experiments explained that the high sensitivity and selectivity are caused by the intrinsic differences in Raman intensity and different adsorption energies from the pharmaceutical molecules adsorbed on Au/MIL-101(Cr), respectively. This study provides an effective way to enrich and detect pharmaceutical molecules with similar structures.