Store-operated Ca2+ entry (SOCE) through Ca2+ release-activated Ca2+ (CRAC) channels is critical for lymphocyte function and immune responses. CRAC channels are hexamers of ORAI proteins that form the channel pore, but the contributions of individual ORAI homologues to CRAC channel function are not well understood. Here we show that deletion of Orai1 reduces, whereas deletion of Orai2 increases, SOCE in mouse T cells. These distinct effects are due to the ability of ORAI2 to form heteromeric channels with ORAI1 and to attenuate CRAC channel function. The combined deletion of Orai1 and Orai2 abolishes SOCE and strongly impairs T cell function. In vivo, Orai1/Orai2 double-deficient mice have impaired T cell-dependent antiviral immune responses, and are protected from T cell-mediated autoimmunity and alloimmunity in models of colitis and graft-versus-host disease. Our study demonstrates that ORAI1 and ORAI2 form heteromeric CRAC channels, in which ORAI2 fine-tunes the magnitude of SOCE to modulate immune responses.