G-protein-coupled receptors (GPCRs) recognize ligands of widely different efficacies, from inverse to partial and full agonists, which transduce cellular signals at differentiated levels. However, the mechanism of such graded activation remains unclear. Using the Gaussian accelerated molecular dynamics (GaMD) method that enables both unconstrained enhanced sampling and free energy calculation, we have performed extensive GaMD simulations (∼19 μs in total) to investigate structural dynamics of the M2 muscarinic GPCR that is bound by the full agonist iperoxo (IXO), the partial agonist arecoline (ARC), and the inverse agonist 3-quinuclidinyl-benzilate (QNB), in the presence or absence of the G-protein mimetic nanobody. In the receptor-nanobody complex, IXO binding leads to higher fluctuations in the protein-coupling interface than ARC, especially in the receptor transmembrane helix 5 (TM5), TM6, and TM7 intracellular domains that are essential elements for GPCR activation, but less flexibility in the receptor extracellular region due to stronger binding compared with ARC. Two different binding poses are revealed for ARC in the orthosteric pocket. Removal of the nanobody leads to GPCR deactivation that is characterized by inward movement of the TM6 intracellular end. Distinct low-energy intermediate conformational states are identified for the IXO- and ARC-bound M2 receptor. Both dissociation and binding of an orthosteric ligand are observed in a single all-atom GPCR simulation in the case of partial agonist ARC binding to the M2 receptor. This study demonstrates the applicability of GaMD for exploring free energy landscapes of large biomolecules and the simulations provide important insights into the GPCR functional mechanism.