Individual differences in behaviour and reactions to various environmental stress stimulus could reflect substantial differences in coping patterns among animals, including immune–endocrine responses. However, few studies have been conducted in this domain. In this study, two types of flounder (Paralichthys olivaceus) (bold individuals (BI) and shy individuals (SI)) were screened out and the expression of genes related to the immune–endocrine was in their head kidneys under temperature stress. BI and SI had the long‐term and stable differential expression of IRAF6 (tumour necrosis factor receptor‐associated factor 6), IL10 (Interleukin 10) and UII (urotensin Ⅱ) genes in the head kidney at optimum temperature (18℃). During acute hypothermal stress, the SI inflammatory gene TNFα (tumour necrosis factor‐α) was significantly downregulated, and IL6 (interleukin 6) and IL10 (interleukin10) were significantly upregulated. In acute hyperthermal stress, the SI inflammatory genes TNFα and IL6 were significantly downregulated, while IL10 continued to be significantly upregulated. Immune genes in BI showed no significant changes under acute temperature stress. We found that endocrine genes CRH (corticotropin‐releasing hormone), UI (Urotensin I) and UII showed opposite expression patterns in the head kidney of BI and SI after temperature stress. Meanwhile, gene expression of Hsp70 (heat shock protein 70) responded to hypothermal stress only in SI but not in BI, indicating that Hsp70 is involved in resistance to hypothermal stress only in SI. Through the correlation analysis of the genes discovered in this study, there is an opposite correlation between the part of endocrine–immune genes of BI and SI. It indicates differences in the regulatory mechanisms of the immune and endocrine systems in the head kidney of BI and SI under temperature stress.