Caffeine (CFF) is a common antagonist to the four subtypes of adenosine G-protein-coupled receptors (GPCRs), which are critical drug targets for treating heart failure, cancer, and neurological diseases. However, the pathways and mechanism of CFF binding to the target receptors remain unclear. In this study, we have performed all-atom-enhanced sampling simulations using a robust Gaussian-accelerated molecular dynamics (GaMD) method to elucidate the binding mechanism of CFF to human adenosine A2A receptor (A2AAR). Multiple 500-1,000 ns GaMD simulations captured both binding and dissociation of CFF in the A2AAR. The GaMD-predicted binding poses of CFF were highly consistent with the x-ray crystal conformations with a characteristic hydrogen bond formed between CFF and residue N6.55 in the receptor. In addition, a low-energy intermediate binding conformation was revealed for CFF at the receptor extracellular mouth between ECL2 and TM1. While the ligand-binding pathways of the A2AAR were found similar to those of other class A GPCRs identified from previous studies, the ECL2 with high sequence divergence serves as an attractive target site for designing allosteric modulators as selective drugs of the A2AAR.