BackgroundTuberous sclerosis complex (TSC) is one of the most common genetic causes of epilepsy. Identifying differentially expressed lipid metabolism related genes (DELMRGs) is crucial for guiding treatment decisions.MethodsWe acquired tuberous sclerosis related epilepsy (TSE) datasets, GSE16969 and GSE62019. Differential expression analysis identified 1,421 differentially expressed genes (DEGs). Intersecting these with lipid metabolism related genes (LMRGs) yielded 103 DELMRGs. DELMRGs underwent enrichment analyses, biomarker selection, disease classification modeling, immune infiltration analysis, weighted gene co-expression network analysis (WGCNA) and AUCell analysis.ResultsIn TSE datasets, 103 DELMRGs were identified. Four diagnostic biomarkers (ALOX12B, CBS, CPT1C, and DAGLB) showed high accuracy for epilepsy diagnosis, with an AUC value of 0.9592. Significant differences (p < 0.05) in Plasma cells, T cells regulatory (Tregs), and Macrophages M2 were observed between diagnostic groups. Microglia cells were highly correlated with lipid metabolism functions.ConclusionsOur research unveiled potential DELMRGs (ALOX12B, CBS, CPT1C and DAGLB) in TSE, which may provide new ideas for studying the psathogenesis of epilepsy.