The bean bug Riptortus pedestris possesses a specialized symbiotic organ in a posterior region of the midgut, where numerous crypts harbor extracellular betaproteobacterial symbionts of the genus Burkholderia. Second instar nymphs orally acquire the symbiont from the environment, and the symbiont infection benefits the host by facilitating growth and by occasionally conferring insecticide resistance. Here we performed comparative transcriptomic analyses of insect genes expressed in symbiotic and non-symbiotic regions of the midgut dissected from Burkholderia-infected and uninfected R. pedestris. Expression sequence tag analysis of cDNA libraries and quantitative reverse transcription PCR identified a number of insect genes expressed in symbiosis- or aposymbiosis-associated patterns. For example, genes up-regulated in symbiotic relative to aposymbiotic individuals, including many cysteine-rich secreted protein genes and many cathepsin protease genes, are likely to play a role in regulating the symbiosis. Conversely, genes up-regulated in aposymbiotic relative to symbiotic individuals, including a chicken-type lysozyme gene and a defensin-like protein gene, are possibly involved in regulation of non-symbiotic bacterial infections. Our study presents the first transcriptomic data on gut symbiotic organ of a stinkbug, which provides initial clues to understanding of molecular mechanisms underlying the insect-bacterium gut symbiosis and sheds light on several intriguing commonalities between endocellular and extracellular symbiotic associations.