Nature uses compact but functionalized biosynthetic fragments as building blocks to generate complex natural products. To leverage this strategy for the discovery of natural products with new scaffolds, we performed genome mining to identify biosynthetic gene clusters (BGCs) in fungi that embed genes that can synthesize targeted fragments. The three-enzyme pathway that biosynthesizes the strained dityrosine cyclophane in the herquline A pathway was used to identify a large number of potential BGCs that may use the cyclophane as a fragment. Characterization of a conserved BGC from fungal strains led to the isolation of octacyclin A, an octacyclic natural product with an unprecedented structure, including two hetero-[3.3.1]bicycles and a combination of fused, bridged, and macrocyclic rings. Biosynthetic steps leading to octacyclin A were fully elucidated using pathway reconstitution and enzymatic assays, unveiling intriguing chemical logic and new enzymatic reactions in building the octacyclic core. Our work demonstrates the potential utility of fragment-guided genome mining in expanding natural product chemical space.