Eccrine sweat glands are essential for sweating and thermoregulation in humans. Loss-of-function mutations in the Ca2+ release–activated Ca2+ (CRAC) channel genes ORAI1 and STIM1 abolish store-operated Ca2+ entry (SOCE), and patients with these CRAC channel mutations suffer from anhidrosis and hyperthermia at high ambient temperatures. Here we have shown that CRAC channel–deficient patients and mice with ectodermal tissue–specific deletion of Orai1 (Orai1K14Cre) or Stim1 and Stim2 (Stim1/2K14Cre) failed to sweat despite normal sweat gland development. SOCE was absent in agonist-stimulated sweat glands from Orai1K14Cre and Stim1/2K14Cre mice and human sweat gland cells lacking ORAI1 or STIM1 expression. In Orai1K14Cre mice, abolishment of SOCE was associated with impaired chloride secretion by primary murine sweat glands. In human sweat gland cells, SOCE mediated by ORAI1 was necessary for agonist-induced chloride secretion and activation of the Ca2+-activated chloride channel (CaCC) anoctamin 1 (ANO1, also known as TMEM16A). By contrast, expression of TMEM16A, the water channel aquaporin 5 (AQP5), and other regulators of sweat gland function was normal in the absence of SOCE. Our findings demonstrate that Ca2+ influx via store-operated CRAC channels is essential for CaCC activation, chloride secretion, and sweat production in humans and mice.