As a key cellular sensor, the TRPV1 channel undergoes a gating transition from a closed state to an open state in response to many physical and chemical stimuli. This transition is regulated by small-molecule ligands including lipids and various agonists/antagonists, but the underlying molecular mechanisms remain obscure. Thanks to recent revolution in cryo-electron microscopy, a growing list of new structures of TRPV1 and other TRPV channels have been solved in complex with various ligands including lipids. Toward elucidating how ligand binding correlates with TRPV1 gating, we have performed extensive molecular dynamics simulations (with cumulative time of 20 μs), starting from high-resolution structures of TRPV1 in both the closed and open states. By comparing between the open and closed state ensembles, we have identified state-dependent binding sites for small-molecule ligands in general and lipids in particular. We further use machine learning to predict top ligand-binding sites as important features to classify the closed vs open states. The predicted binding sites are thoroughly validated by matching homologous sites in all structures of TRPV channels bound to lipids and other ligands, and with previous functional/mutational studies of ligand binding in TRPV1. Taken together, this study has integrated rich structural, dynamic, and functional data to inform future design of small-molecular drugs targeting TRPV1.