Intestinal intraepithelial lymphocytes (IELs) are characterized by an unusual phenotype and developmental pathway, yet their specific ligands and functions remain largely unknown. Here by analysis of QFL T cells, a population of CD8+ T cells critical for monitoring the MHC I antigen processing pathway, we established that unconventional Qa-1b-restricted CD8+ T cells are abundant in intestinal epithelium. We found that QFL T cells showed a Qa-1b-dependent unconventional phenotype in the spleen and small intestine of naïve wild-type mice. The splenic QFL T cells showed innate-like functionality exemplified by rapid response to cytokines or antigens, while the gut population was refractory to stimuli. Microbiota was required for the maintenance, but not the initial gut homing of QFL T cells. Moreover, monocolonization with Pediococcus pentosaceus, which expresses a peptide that cross-activated QFL T cells, was sufficient to maintain QFL T cells in the intestine. Thus, microbiota is critical for shaping the Qa-1b-restricted IEL landscape.