Pigeon pea, the only woody legume in the world,is also a medicinal-food homogenous crop. At the same time, the calcineurin B-like (CBL) proteins that mediate a variety of abiotic stress responses are largely unknown. Here, we performed a bioinformatics analysis of the CBL family in pigeon pea, and initially verified the function of CcCBL4 in stress resistance and secondary metabolic synthesis. CBL family genes respond to 4 °C, 42 °C, NaCl, and drought stresses, and we observed the chlorophyll, relative water, proline and soluble sugar in CcCBL4-OE (over-expression) were significantly higher than CK (empty vectors) plants after stresses, and the integrity of the cell membrane was better. Seven secondary metabolites were detected, and we found that the p-coumaric acid in OE was 1.4-fold that in CK plants, but the apigenin and pterostilbene were reduced. And the expression of genes in these pathways was also confirmed changes. Altogether, our work revealed a potential regulation mechanism between CcCBL proteins, stress resistance and flavonoid metabolism, which is conducive to enhance the adaptability of pigeon pea to the environment.