Bile acids (BAs) as cholesterol-derived molecules play an essential role in some physiological processes such as nutrient absorption, glucose homeostasis and regulation of energy expenditure. They are synthesized in the liver as primary BAs such as cholic acid (CA), chenodeoxycholic acid (CDCA) and conjugated forms. A variety of secondary BAs such as deoxycholic acid (DCA) and lithocholic acid (LCA) and their derivatives is synthesized in the intestine through the involvement of various microorganisms. In addition to essential physiological functions, BAs and their metabolites are also involved in the differentiation and functions of innate and adaptive immune cells such as macrophages (Macs), dendritic cells (DCs), myeloid derived suppressive cells (MDSCs), regulatory T cells (Treg), Breg cells, T helper (Th)17 cells, CD4 Th1 and Th2 cells, CD8 cells, B cells and NKT cells. Dysregulation of the BAs and their metabolites also affects development of some diseases such as inflammatory bowel diseases. We here summarize recent advances in how BAs and their metabolites maintain gut and systemic homeostasis, including the metabolism of the BAs and their derivatives, the role of BAs and their metabolites in the differentiation and function of immune cells, and the effects of BAs and their metabolites on immune-associated disorders.