The global demand of prebiotics such as xylooligosaccharides (XOS) has been growing over the years, motivating the search for different production processes with increased efficiency. In this study, a cloned Bacillus subtilis 3610, containing the xylanase gene xyn2 of Trichoderma reesei coupled with an endogenous secretion tag, was selected for XOS production through direct fermentation of beechwood xylan. A mixture of XOS with a degree of polymerization ranging from 4 to 6 was obtained, presenting high stability after a static in vitro digestion (98.5 ± 0.2%). The maximum production yield expressed as total XOS per amount of xylan (306 ± 4 mg/g) was achieved after 8 h of fermentation operating under one-time impulse fed-batch. The optimal conditions found were pH 6.0 and 42.5°C, using 2.5 g/L of initial concentration of xylan increased up to 5.0 g/L at 3 h. Xylopentaose was the major oligosaccharide produced, representing 47% of the total production yield.