Clay-swelling inhibitors are often used to prevent the hydration of clay minerals, which can reduce the risk of wellbore instability and reservoir damage. The molecular behaviour of clay-swelling inhibitors at the montmorillonite–water interface is crucial for revealing their inhibition mechanisms and for evaluating and designing inhibitor molecules. N1,N1'-(ethane-1,2-diyl)bis(N1-(2-aminoethyl)ethane-1,2-diamine) (NETS), a low-molecular-weight clay-swelling inhibitor, is used widely to prevent clay swelling. Herein, the adsorption mechanism of NETS on the surface of montmorillonite (Mnt) was investigated using molecular dynamics (MD) simulations. In particular, the effects of molecular conformation and temperature on adsorption ability were investigated. The results show that the adsorption ability of NETS on the Mnt surface was affected significantly by the molecular conformation. Specifically, the dihedral angle of NETS adsorbed on the surface of Mnt decreases by ~20° and tends to adsorb on the surface of Mnt in a plane state. In addition, the adsorption stability of NETS on the Mnt surface decreased with increasing temperature, as was found using MD simulations. Detailed analysis shows that increasing temperature can lead to more frequent conformational changes, which weaken the interaction between NETS and Mnt, thus reducing adsorption stability. These molecular insights into the interaction mechanism between NETS and Mnt are beneficial for the evaluation of inhibitory effects and for the selection and molecular design of new clay-swelling inhibitors for use in drilling fluids.