The mechanistic study of new pharmaceutical compounds is crucial for evaluating their efficacy, identifying potential side effects, and optimising drug formulations. This study aimed to investigate the mechanism of action of trigonelline on the promastigote and amastigote stages of Leishmania major (MRHO/IR/75/ER). An initial in silico study was conducted to examine the pharmacological effects of trigonelline using molecular docking to evaluate the potential binding affinity of trigonelline with nitrate, a crucial molecule in the macrophage immune response against Leishmania. In this experimental study, the inhibitory mechanism of trigonelline on promastigotes was evaluated by measuring metacaspase expression levels. In the amastigote stage of L. major, the expression levels of inducible nitric oxide synthase (iNOS), interleukin 12 (IL‐12), interferon‐gamma (IFN‐γ), tumour necrosis factor alpha (TNF‐α), transforming growth factor‐β (TGF‐β) and interleukin 10 (IL‐10) genes were assessed using Real‐time PCR. Trigonelline demonstrated a high‐binding affinity to the iNOS molecule in computer modelling. In macrophages treated with various concentrations of trigonelline, glucantime and their combination, the expression levels of metacaspase, IL‐12, TNF‐α, IFN‐γ and iNOS genes significantly increased compared to the control group (p < 0.05), whereas IL‐10 and TGF‐β gene expression levels significantly decreased (p < 0.05). Trigonelline exerts its antileishmanial effects through its high antioxidant properties, non‐cytotoxicity to macrophages, and its ability to enhance apoptosis and cell cycle arrest in promastigotes of L. major.