Chronic inflammatory and neuropathic pain is often difficult to manage using conventional remedies. The underlying mechanisms and therapeutic strategies required for the management of chronic pain need to be urgently established. The cyclic AMP (cAMP) second messenger system has been implicated in the mechanism of nociception, and the inhibition of the cAMP pathway by blocking the activities of adenylyl cyclase (AC) and protein kinase A has been found to prevent chronic pain in animal models. However, little is known regarding which of the 10 known isoforms of AC are involved in nociceptive pathways. Therefore, we investigated the potential pronociceptive function of AC5 in nociception using recently developed AC5 knockout mice (AC5-/-). We found that AC5-/- mice show markedly attenuated pain-like responses in acute thermal and mechanical pain tests as compared with the wildtype control. Also, AC5-/- mice display hypoalgesic responses to inflammatory pain induced by subcutaneous formalin injection into hindpaws, and to non-inflammatory and inflammatory visceral pain induced by injecting magnesium sulfate or acetic acid into the abdomen. Moreover, AC5-/- mice show strongly suppressed mechanical and thermal allodynia in two nerve injury-induced neuropathic pain models. These results suggest that AC5 is essential for acute and chronic pain, and that AC5 knockout mice provide a useful model for the evaluation of the pathophysiological mechanisms of pain.