Anxiety and metabolic impairments are often inter-related, but the underlying mechanisms are unknown. To seek RNAs involved in the anxiety disorder–metabolic disorder link, we subjected zebrafish larvae to caffeine-induced anxiety or high-fat diet (HFD)-induced obesity followed by RNA sequencing and analyses. Notably, differentially expressed (DE) transcripts in these larval models and an adult zebrafish caffeine-induced anxiety model, as well as the transcript profiles of inherently anxious versus less anxious zebrafish strains and high-fat diet-fed versus standard diet-fed adult zebrafish, revealed inversely regulated DE transcripts. In both larval anxiety and obesity models, these included long noncoding RNAs and transfer RNA fragments, with the overrepresented immune system and inflammation pathways, e.g., the “interleukin signaling pathway” and “inflammation mediated by chemokine and cytokine signaling pathway”. In adulthood, overrepresented immune system processes included “T cell activation”, “leukocyte cell-cell adhesion”, and “antigen processing and presentation”. Furthermore, unlike adult zebrafish, obesity in larvae was not accompanied by anxiety-like behavior. Together, these results may reflect an antagonistic pleiotropic phenomenon involving a re-adjusted modulation of the anxiety–metabolic links with an occurrence of the acquired immune system. Furthermore, the HFD potential to normalize anxiety-upregulated immune-related genes may reflect the high-fat diet protection of anxiety and neurodegeneration reported by others.