Patients with high-grade serous ovarian carcinoma (HGSC) exhibit poor 5-year survival rates, which may be significantly improved by early-stage detection. The U.S. Food and Drug Administration-approved biomarkers for HGSC-CA-125 (cancer antigen 125) and HE4 (human epididymis protein 4)-do not generally appear at detectable levels in the serum until advanced stages of the disease. An implantable device placed proximal to disease sites, such as in or near the fallopian tube, ovary, uterine cavity, or peritoneal cavity, may constitute a feasible strategy to improve detection of HGSC. We engineered a prototype optical sensor composed of an antibody-functionalized carbon nanotube complex, which responds quantitatively to HE4 via modulation of the nanotube optical bandgap. The complexes measured HE4 with nanomolar sensitivity to differentiate disease from benign patient biofluids. The sensors were implanted into four models of ovarian cancer, within a semipermeable membrane, enabling the optical detection of HE4 within the live animals. We present the first in vivo optical nanosensor capable of noninvasive cancer biomarker detection in orthotopic models of disease.