Transposable elements (TEs) can alter host gene structure and expression, whereas host organisms develop mechanisms to repress TE activities. In the nematode Caenorhabditis elegans , a small interfering RNA pathway dependent on the helicase ERI-6/7 primarily silences retrotransposons and recent genes of likely viral origin. By studying gene expression variation among wild C. elegans strains, we found that structural variants and transposon remnants likely underlie expression variation in eri-6/7 and the pathway targets. We further found that multiple insertions of the DNA transposons, Polintons, reshuffled the eri-6/7 locus and induced inversion of eri-6 in some wild strains. In the inverted configuration, gene function was previously shown to be repaired by unusual trans-splicing mediated by direct repeats. We identified that these direct repeats originated from terminal inverted repeats of Polintons . Our findings highlight the role of host-transposon interactions in driving rapid host genome diversification among natural populations and shed light on evolutionary novelty in genes and splicing mechanisms.