Human leucocyte antigen B*27 (HLA-B*27) is strongly associated with inflammatory diseases of the spine and pelvis (for example, ankylosing spondylitis (AS)) and the eye (that is, acute anterior uveitis (AAU))1. How HLA-B*27 facilitates disease remains unknown, but one possible mechanism could involve presentation of pathogenic peptides to CD8+ T cells. Here we isolated orphan T cell receptors (TCRs) expressing a disease-associated public β-chain variable region–complementary-determining region 3β (BV9–CDR3β) motif2–4 from blood and synovial fluid T cells from individuals with AS and from the eye in individuals with AAU. These TCRs showed consistent α-chain variable region (AV21) chain pairing and were clonally expanded in the joint and eye. We used HLA-B*27:05 yeast display peptide libraries to identify shared self-peptides and microbial peptides that activated the AS- and AAU-derived TCRs. Structural analysis revealed that TCR cross-reactivity for peptide–MHC was rooted in a shared binding motif present in both self-antigens and microbial antigens that engages the BV9–CDR3β TCRs. These findings support the hypothesis that microbial antigens and self-antigens could play a pathogenic role in HLA-B*27-associated disease.