Two pairs of diastereoisomeric isoindoline alkaloids, xylarins A-D (1-4), were isolated from the endolichenic fungus Xylaria sp. Xylarins A and B (1 and 2) possess a previously undescribed 5/6/5-5/6 polycyclic scaffold, featuring a combination of a novel dihydrobenzofurone unit and an isoindoline unit, while xylarins C and D (3 and 4) contain an additional N,N-dimethylaniline at the C-3' position. Their structures were elucidated by comprehensive spectroscopic analyses combined with single-crystal X-ray diffraction and electronic circular dichroism calculations. The plausible biosynthetic pathways and gene clusters for 1-4 were proposed. Compound 1 exhibited significant antithrombotic activity.