A gene from Xylaria sp. BCC 1067, pks3, that encodes a putative 3660-residue hybrid polyketide synthase (PKS)/non-ribosomal peptide synthetase (NRPS) was characterised by targeted gene disruption in combination with comprehensive product identification. Studies of the features of a corresponding mutant, YA3, allowed us to demonstrate that pks3 is responsible for the synthesis of a new pyrroline compound, named xyrrolin, in the wild-type Xylaria sp. BCC 1067. The structure of xyrrolin was established by extensive spectroscopic and spectrometric analyses, including low- and high-resolution MS, IR, 1H NMR, 13C NMR, 13C NMR with Dept135, HMQC 2D NMR, HMBC 2D NMR and COSY 2D NMR. On the basis of the Pks3 domain organisation and the chemical structure of xyrrolin, we proposed that biosynthesis of this compound requires the condensation of a tetraketide and an L-serine unit, followed by Dieckmann or reductive cyclisation and enzymatic removal of ketone residue(s). Bioassays of the pure xyrrolin further displayed cytotoxicity against an oral cavity (KB) cancer cell line.