BackgroundMania has caused incalculable economic losses for patients, their families, and even society, but there is currently no effective treatment plan for this disease without side effects.MethodsUsing bioinformatics and Mendelian randomization methods, potential drug target genes and key substances associated with mania were explored at the mRNA level. We used the chip expression profile from the GEO database to screen differential genes and used the eQTL and mania GWAS data from the IEU database for two-sample Mendelian randomization (MR) to determine core genes by colocalization. Next, we utilized bioinformatics analysis to identify key substances involved in the mechanism of action and determined related gene targets as drug targets.ResultsAfter differential expression analysis and MR, a causal relationship between the expression of 46 genes and mania was found. Colocalization analysis yielded six core genes. Five key substances were identified via enrichment analysis, immune-related analysis, and single-gene GSVA analysis of the core genes. MR revealed phenylalanine to be the only key substance that has a unidirectional causal relationship with mania. In the end, SBNO2, PBX2, RAMP3, and QPCT, which are significantly associated with the phenylalanine metabolism pathway, were identified as drug target genes.ConclusionSBNO2, PBX2, RAMP3, and QPCT could serve as potential target genes for mania treatment and deserve further basic and clinical research. Medicinal target genes regulate the phenylalanine metabolism pathway to achieve the treatment of mania. Phenylalanine is an important intermediate substance in the treatment of mania that is regulated by drug target genes.