Cyclin-dependent kinase-like 5 (CDKL5) is a Ser/Thr protein kinase predominantly expressed in the brain. Mutations of the CDKL5 gene lead to CDKL5 disorder, a neurodevelopmental pathology that shares several features with Rett Syndrome and is characterized by severe intellectual disability. The phosphorylation targets of CDKL5 are largely unknown, which hampers the discovery of therapeutic strategies for improving the neurological phenotype due to CDKL5 mutations. Here, we show that the histone deacetylase 4 (HDAC4) is a direct phosphorylation target of CDKL5 and that CDKL5-dependent phosphorylation promotes HDAC4 cytoplasmic retention. Nuclear HDAC4 binds to chromatin as well as to MEF2A transcription factor, leading to histone deacetylation and altered neuronal gene expression. By using a Cdkl5 knockout (Cdkl5 -/Y) mouse model, we found that hypophosphorylated HDAC4 translocates to the nucleus of neural precursor cells, thereby reducing histone 3 acetylation. This effect was reverted by re-expression of CDKL5 or by inhibition of HDAC4 activity through the HDAC4 inhibitor LMK235. In Cdkl5 -/Y mice treated with LMK235, defective survival and maturation of neuronal precursor cells and hippocampus-dependent memory were fully normalized. These results demonstrate a critical role of HDAC4 in the neurodevelopmental alterations due to CDKL5 mutations and suggest the possibility of HDAC4-targeted pharmacological interventions.