Molecular dynamics (MD) simulations followed by molecular mechanics generalized Born surface area (MM-GBSA) analyses have been carried out to study the selectivity of two neutral and weakly basic P1 group inhibitors (177 and CDA) to thrombin and trypsin. Detailed binding free energies between these inhibitors and individual protein residues are calculated by using a per-residue basis decomposition method. The analysis of the detailed interaction energies provides insight on the protein-inhibitor-binding mechanism and helps to elucidate the basis for achieving selectivity through interpretation of the structural and energetic results from the simulations. The study shows that the dominant factor of selectivity for both inhibitors is van der Waals energy, which suggests better shape complementarity and packing with thrombin. Nonpolar solvation free energy and total entropy contribution are also in favor of selectivity, but the contributions are much smaller. Binding mode and structural analysis show that 177 binds to thrombin and trypsin in a similar binding mode. In contrast, the CDA binds to thrombin and trypsin in very different modes.