Tamoxifen significantly reduces tumor recurrence in certain patients with early-stage estrogen receptor-positive breast cancer, but markers predictive of treatment failure have not been identified. Here, we generated gene expression profiles of hormone receptor-positive primary breast cancers in a set of 60 patients treated with adjuvant tamoxifen monotherapy. An expression signature predictive of disease-free survival was reduced to a two-gene ratio, HOXB13 versus IL17BR, which outperformed existing biomarkers. Ectopic expression of HOXB13 in MCF10A breast epithelial cells enhances motility and invasion in vitro, and its expression is increased in both preinvasive and invasive primary breast cancer. The HOXB13:IL17BR expression ratio may be useful for identifying patients appropriate for alternative therapeutic regimens in early-stage breast cancer.