The recombination activating gene (RAG or RAG1/RAG2 complex)-mediated adaptive immune system is a hallmark of jawed vertebrates. It has been reported that RAG originated in invertebrates. However, whether RAG further evolved once it arose in jawed vertebrates remains largely unknown. Here, we found that zebrafish RAG (zRAG) had a lower activity than mouse RAG (mRAG). Intriguingly, the attenuated stability of zebrafish RAG2 (zRAG2), but not zebrafish RAG1, caused the reduced V(D)J recombination efficiency compared to mRAG at 37 °C which are the body temperature of most endotherms except birds. Importantly, the lower temperature 28 °C, which is the best temperature for zebrafish growth, made the recombination efficiency of zRAG similar to that of mRAG by improving the stability of zRAG2. Consistent with the prementioned observation, the V(D)J recombination of Rag2 KI/KI mice, which zRAG2 was substituted for mRAG2, was also severely impaired. Unexpectedly, Rag2 KI/KI mice developed cachexia syndromes accompanied by premature death. Taken together, our findings illustrate that the evolution of zebrafish RAG2 protein is required for adapting to the elevated body temperature of the higher endothermic vertebrates. Jawed vertebrates possess a diverse repertoire of T cell receptors (TCRs) and immunoglobulins (Igs) to specifically recognize and ultimately destroy unlimited numbers of foreign and lethal invaders or pathogens 1-3. TCRs and Igs are assembled via the recombination of variable (V), diversity (D), and joining (J) gene segments 3-5. The V(D)J recombination is a cut-and-paste reaction mediated by the RAG1/RAG2 complex (RAG) within specific genomic recombination signal sequence (RSS) sites 3,4,6. Therefore, RAG triggers the TCR-and Ig-based adaptive immune system of jawed vertebrates to defense foreign invaders 7,8. In recent decades, many scientists have carefully explored the origin of RAG 8-10. Our previous study has shown that bfRAG1L, an amphioxus RAG1-like DNA fragment, encodes a functional central domain of the vertebrate core RAG1 9. Another study found that RAG1 originated from the Transib transposase and could independently mediate V(D)J recombination 10. An interesting discovery was that of amphioxus ProtoRAG, which was demonstrated to be a cut-and-paste DNA transposon from amphioxus, placing the origination of RAG as far back as in basal chordates 8. Although the origin of RAG has been well studied, however, it has remained largely unknown whether RAG in jawed vertebrates from ectotherms to endotherms further evolved. The most evolutionarily ancient living jawed vertebrates are cartilaginous fish (e.g., horned sharks), which have been verified to have a complete set of RAGs, TCRs and Igs 2,11. When lower jawed vertebrates evolved into higher jawed vertebrates, they faced not only the transition in themselves from ectothermy to endothermy but also the transition in environment from aquatic to terrestrial. This process occurred along with numerous environmental changes associated with air,