hCG can be detected in the blood and urine of patients with certain types of cancers. Elevated levels of hCG can indicate the presence of cancers such as choriocarcinoma, testicular cancer (especially germ cell tumors), and sometimes ovarian cancer. It serves as a biomarker that helps in the early detection and diagnosis of these malignancies.