Survival of insects on a substrate containing toxic substances such as plant secondary metabolites or insecticides is dependent on the metabolism or excretion of those xenobiotics. The primary sites of xenobiotic metabolism are the midgut, Malpighian tubules, and fat body. In general, gene expression in these organs is reported for the entire tissue by online databases, but several studies have shown that gene expression within the midgut is compartmentalized. Here, RNA sequencing is used to investigate whole-genome expression in subsections of third instar larval midguts of Drosophila melanogaster. The data support functional diversification in subsections of the midgut. Analysis of the expression of gene families that are implicated in the metabolism of xenobiotics suggests that metabolism may not be uniform along the midgut. These data provide a starting point for investigating gene expression and xenobiotic metabolism and other functions of the larval midgut.