The FK506-binding protein 51 (FKBP51, encoded by FKBP5 gene) has emerged as a critical regulator of mammalian endocrine stress responses and as a potential pharmacological target for metabolic disorders, including type 2 diabetes (T2D). However, in β cells, which secrete the only glucose-lowering hormone-insulin, the expression and function of FKBP5 has not been documented. Here, using human pancreatic tissue and primary human islets, we demonstrated the abundant expression of FKBP5 in β cells, which displayed an responsive induction upon acute inflammatory stress mimicked by in vitro treatment with a cocktail of inflammatory cytokines (IL-1β, IFN-γ, and TNF-α). To explore its function, siRNAs targeting FKBP5 and pharmacological inhibitor SAFit2 were applied both in clonal NIT-1 cells and primary human/mice islets. We found that FKBP5 inhibition promoted β-cell survival, improved insulin secretion, and upregulated β-cell functional gene expressions (MAFA and NKX6.1) in acute-inflammation stressed β cells. In primary human and mice islets, which constitutively suffer from inflammation stress during isolation and culture, FKBP5 inhibition also presented decent performance in improving islet function, in accordance with its protective effect against inflammation. Molecular studies found that FKBP5 is an important regulator for FOXO1 phosphorylation at Serine 256, and silencing of FOXO1 abrogated the protective effect of FKBP5 inhibition, suggesting that it is the key downstream effector of FKBP5 in β cells. At last, in situ detection of FKBP5 protein expression on human and mice pancreases revealed a reduction of FKBP5 expression in β cells in human T2D patients, as well as T2D mice model (db/db), which may indicate a FKBP5-inhibition-mediated pro-survival mechanism against the complex stresses in T2D milieus.