Owing to its special role as a negative regulator in both insulin and leptin signaling, protein tyrosine phosphatase-1B (PTP1B) has drawn considerable attention as a target for treating type 2 diabetes and obesity. It, however, is a great challenge to discover inhibitors specific to each PTP due to the highly homologous. In this study, a series of compounds were discovered to inhibit PTP1B based on imidazolidine-2,4-dione by means of ‘core hopping’. A selective PTP1B inhibitor (comp#h) was identified, and molecular dynamics simulation and binding free energy calculation were carried out to propose the most likely binding mode of comp#h with PTP1B. The findings reported here may provide a new strategy in discovering selective and effective inhibitors for treating diabetes.