Background/Aims: Cholangiocarcinoma (CCA) is a malignant tumor that is resistant to chemotherapy, so new therapeutic agents are needed. Allicin which is rapidly converted from allin by allinase, is one of the most biologically active compounds in freshly crushed garlic and has been shown to have strong anti-tumor effects. Our aim was to explore the molecular mechanism by which allicin affects the cell proliferation and invasion of CCA. Methods: Cell viability and apoptosis were measured using the CCK-8 assay, colony formation assay, and flow cytometry. Cell migration and invasion were evaluated by wound healing and Transwell assays, respectively. The expression of several proteins involved in cell apoptosis and invasion were assessed by Western blot. The activation of STAT3 signaling was detected by Western blot and immunofluorescence staining. The involvement of SHP-1 was determined using small interfering RNA (siRNA). Moreover, a nude mouse model of human CCA was established to assess the anti-tumor effects of allicin in vivo. Results: Allicin significantly suppressed CCA cell proliferation by activating the caspase cascade, inducing apoptosis, and reducing the expression of proteins downstream of STAT3, such as B-cell lymphoma 2 (Bcl-2), while upregulating Bcl-2-associated X (Bax) protein. In addition, allicin inhibited the migration, invasion, and epithelial-mesenchymal transition (EMT) of CCA cells. Moreover, the protein expression of MMP-2 and MMP-9 was significantly downregulated in CCA cells treated with allicin compared with CCA cells treated with control. Mechanistic investigations indicated that allicin upregulated SHP-1 expression in CCA, and pervanadate treatment reversed the allicin-induced downregulation of STAT3. Moreover, suppression of SHP-1 by siRNA overturned the effect of allicin on the induction of SHP-1 and inhibition of STAT3 activation. Additionally, treatment with allicin attenuated tumor growth in the nude mouse model of CCA. Conclusions: Our findings suggest that allicin suppresses cell proliferation and invasion via STAT3 signaling and may be a potential therapeutic agent for CCA.