Recently, bromodomain-containing protein 9 (BRD9), 7 (BRD7), and 4 (BRD4) have been potential targets of anticancer drug design. Molecular dynamic simulations followed by molecular mechanics Poisson-Boltzmann surface area calculation were performed to study the selective mechanism of I-BRD9 inhibitor H1B and its derivatives N1D, TVU, and 5V2 toward BRD9 and BRD4. The rank of our calculated binding free energies agrees with that of the experimental data. The results show that binding free energy of H1B to BRD7 is slightly lower than that of H1B to BRD9, and all four inhibitors bind more tightly to BRD9 than to BRD4. Decomposition of binding free energies into individual residues implies that Ile164 and Asn211 in BRD7 and Ile53 and Asn100 in BRD9 play a significant role in the selectivity of H1B toward BRD7 and BRD9. Besides, several key residues Phe44, Ile53, Asn100, Thr104 in BRD9 and Pro82, Lys91, Asn140, Asp144 in BRD4 that are located in the ZA-loop and BC-loop provide significant contributions to binding selectivity of inhibitors to BRD9 and BRD4. This study is expected to provide important theoretical guidance for rational designs of highly selective inhibitors targeting BRD9 and BRD4.