The nematode Caenorhabditis elegans, with its highly sensitive olfactory system, has emerged as a promising tool for testing chemotaxis. In the field of cancer diagnostics, there is a growing interest in the development of non-invasive screening methods for the detection of volatile organic compounds in a patient's urine. The objective of this study was to contribute to the existing body of knowledge by evaluating the ability of a Caenorhabditis elegans-based chemotaxis assay to discriminate between urine samples from healthy individuals and patients diagnosed with breast or colon cancer. Following synchronization of the developmental stages of C. elegans, nematodes were exposed to the urine of cancer patients and healthy individuals. Subsequently, chemotactic indices were calculated for each urine sample. Our results demonstrated a statistically significant difference in the chemotactic response of C. elegans to urine samples from cancer patients compared to healthy volunteers (p < 0.001). Moreover, the test exhibited promising diagnostic utility, with a sensitivity of 98%, a specificity of 62%, and a detection rate of 78%. Our findings expand on previous observations, confirming the remarkable sensitivity of C. elegans hermaphrodites to discriminating cancer-related volatile organic compounds in urine samples.