This study aimed to investigate the clinical and molecular characteristics of Giardia duodenalis (G. duodenalis) infection and identify potential risk factors in children and teenagers with malignancies in Shiraz, southwestern Iran. A total of 200 fresh fecal samples were collected from children and adolescents suffering from 32 different cancer types at Amir, Nemazee, and Saadi hospitals affiliated with Shiraz University of Medical Sciences between October 2021 and May 2022. Direct microscopy using saline and iodine wet mount was conducted, and all fecal samples were rechecked by SSU-PCR. Subsequently, a specific fragment of the tpi gene was amplified on all samples for prevalence, sequencing, and assemblage identification. Our study found a 4% (8/200) prevalence of G. duodenalis using microscopy and PCR. The molecular findings were consistent with the microscopic results. All eight positive samples with SSU-rRNA gene were also detected as positive with tpi gene and were correctly sequenced. Among the examined cancer patients, two assemblages were identified: A [sub-assemblage AI (2/8, 25%) and sub-assemblage AII (3/8, 37.5%)] and B [sub-assemblage BIV (3/8, 37.5%)]. Notably, patients were more vulnerable to G. duodenalis infection after receiving at least 8 treatment episodes (p < 0.05) and displaying gastrointestinal symptoms (p > 0.05). The demographic characteristics of cancer patients with G. duodenalis infection and the statistical conclusions were separately detailed. The small sample size and low prevalence rate in this study hindered precise epidemiological conclusions. Nonetheless, the results suggest that G. duodenalis infection among cancer patients in Shiraz city originates from humans, without any specific animal groups (C-H) involved.