An extremely thermostable xylanase gene, xynB, from hyperthermophilic bacterium Thermotoga maritima MSB8 was successful expressed in Kluyveromyces lactis. Response surface methodology (RSM) was applied to optimize medium components for production of XynB secreted by the recombinant K. lactis. Secretion level (102 mg/L) and enzyme activity (49 U/ml) of XynB in the optimized medium (yeast extract, lactose, and urea; YLU) were much higher than those (56 mg/L, 16 U/ml) in original medium (yeast extract, lactose, and peptone; YLP). It was also observed that the secretory efficiency of mature XynB was improved by the YLU medium. mRNA levels of 13 characterized secretion-related genes between K. lactis cultured in YLP and YLU were detected using semi-quantitative RT-PCR method. It was found that unfolded protein response (UPR) related genes such as ero1, hac1, and kar2 were up-regulated in K. lactis cultured in YLU. Therefore, nutrient ingredient, especially nitrogen source had a significant influence on the XynB secretory efficiency in the host K. lactis.