G protein-coupled receptors (GPCRs) control most cellular communications with the environment and are the largest protein family of drug targets. As strictly regulated molecular machines, profound comprehension of their activation mechanism is expected to significantly facilitate structure-based drug design. This study provides atomistic-level description of the activation dynamics of the C-X-C chemokine receptor type 4 (CXCR4), a class A GPCR and important drug target. Using molecular dynamics and enhanced sampling, we demonstrate how mutations and protonation of conserved residues trigger activation through microswitches at the receptor core, while sodium ion - a known allosteric modulator - inhibits it. The findings point to a conserved mechanism of activation and the allosteric modulation by sodium in the chemokine receptor family. From the technical aspect, the enhanced sampling protocol effectively samples receptor conformational changes toward activation, and differentiates three variants of the receptor by their basal activity. This work provides structural basis and a powerful in silico tool for CXCR4 agonist design.