P2X3 receptor channels expressed in sensory neurons are activated by extracellular ATP and serve important roles in nociception and sensory hypersensitization, making them attractive therapeutic targets. Although several P2X3 structures are known, it is unclear how physiologically abundant Ca2+-ATP and Mg2+-ATP activate the receptor, or how divalent cations regulate channel function. We used structural, computational and functional approaches to show that a crucial acidic chamber near the nucleotide-binding pocket in human P2X3 receptors accommodates divalent ions in two distinct modes in the absence and presence of nucleotide. The unusual engagement between the receptor, divalent ion and the g-phosphate of ATP enables channel activation by ATP-divalent complex, cooperatively stabilizes the nucleotide on the receptor to slow ATP unbinding and recovery from desensitization, a key mechanism for limiting channel activity. These findings reveal how P2X3 receptors recognize and are activated by divalent-bound ATP, aiding future physiological investigations and drug development.