Androgenetic Alopecia (AGA) occurs due to over-response to androgens causing severe hair loss on the scalp, and requires the development of new and efficient drugs to treat this condition. This study explores and identifies secondary metabolites from Sansevieriatrifasciata Prain using the LC-MS/MS and in-silico method. The inhibitory activity of bioactive compounds from S. trifasciata Prain against androgen receptors (PDB ID: 4K7A) was evaluated molecularly using docking and dynamics studies by comparing their binding energies, interactions, and stability with minoxidil. The results of the LC-MS/MS analysis identified Methyl pyrophaeophorbide A (1), Oliveramine (2), (2S)-3′, 4′-Methylenedioxy-5, 7-dimethoxyflavane (3), 1-Acetyl-β-carboline (4), Digiprolactone (5), Trichosanic acid (6) and Methyl gallate (7) from the leaves subfraction of this plant. Three alkaloid compounds (compounds 1, 3, and 4), and one flavonoid (compound 2), had lower docking scores of −7.0, −5.8, −5.2, and −6.3 kcal/mol, respectively. The prediction of binding energy using the MM-PBSA approach ensured that the potency of the four compounds was better than minoxidil, with energies of −66.13, −59.36, −40.39, and −40.25 kJ/mol for compounds 1, 3, 2, and 4, respectively. The dynamics simulation shows the stability of compound 1 based on the trajectory analysis for the 100 ns simulation. This research succeeded in identifying the compound and assessing the anti-alopecia activity of Sansevieria trifasciata Prain. Seven compounds were identified as new compounds never reported in Sansevieria trifasciata Prain. Four compounds were predicted to have better anti-alopecia activity than minoxidil in inhibiting androgen receptors through an in silico approach.