Inappropriate CD4+ T helper (TH) cell differentiation leads to progression of inflammatory and autoimmune diseases, yet the regulatory mechanisms governing stability and activity of transcription factors controlling TH cell differentiation remain elusive. Here, we describe how pseudokinase serine threonine kinase 40 (STK40) facilitates TH1/TH17 differentiation under pathological conditions. STK40 in T cells is dispensable for immune homeostasis in resting mice. However, mice with T cell-specific deletion of STK40 exhibit attenuated symptoms of experimental autoimmune encephalomyelitis and colitis, accompanied by diminished TH1 and TH17 cell differentiation. Mechanistically, STK40 facilitates K48-linked polyubiquitination and proteasomal degradation of FOXO1/4 through promoting their interaction with E3 ligase COP1. Inhibition of FOXO4 or FOXO1, respectively, restores differentiation potential of STK40-deficient TH1/TH17 cells. Together, our data suggest a crucial role of STK40 in TH1 and TH17 cell differentiation, thereby enabling better understanding of the molecular regulatory network of CD4+ T cell differentiation and providing effective targets for the treatment of autoimmune diseases.