Anaplastic lymphoma kinase (ALK) has gained increased attention as an attractive therapeutic target for the treatment of various cancers, especially non-small-cell lung cancer (NSCLC). Recently, piperidine carboxamides were reported as Type I1/2 inhibitors of ALK, which occupy both the ATP binding site and the back ATP hydrophobic cavity in DFG-in conformation. Due to the dynamic behavior of ALK in the binding of Type I1/2 inhibitors, the accurate predictions of the binding structures and relative binding potencies of these inhibitors are quite challenging. In this study, different modeling techniques, including molecular docking, ensemble docking based on multiple receptor conformations, molecular dynamics simulations and free energy calculations, were utilized to explore the binding mechanisms of piperidine carboxamides. Our predictions show that the conventional docking protocols are not sufficient to predict the relative binding potencies of the studied inhibitors with high accuracy, but incorporating protein flexibility before or after docking is quite effective to improve the prediction accuracy. Notably, the binding free energies predicted by MM/GBSA or MM/PBSA based on the MD simulations for the docked poses give the highest correlation with the experimental data, highlighting the importance of the inclusion of receptor flexibility for the accurate predictions of the binding potencies for Type I1/2 inhibitors of ALK. Furthermore, the comprehensive analysis of several pairs of representative inhibitors demonstrates the importance of hydrophobic interactions in improving the binding affinities of the inhibitors with the hot-spot residues surrounding the binding pocket. This work is expected to provide valuable clues for further rational design of novel and potent Type I1/2 ALK inhibitors.