Transposable elements (TEs) can alter host gene structure and expression, whereas host organisms develop mechanisms to repress TE activities. In the nematode <i>Caenorhabditis elegans</i>, 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 <i>C. elegans</i> strains, we found that structural variants and transposon remnants likely underlie expression variation in <i>
eri-6/7</i> and the pathway targets. We further found that multiple insertions of the DNA transposons, <i>Polintons,</i> reshuffled the <i>
eri-6/7</i> locus and induced inversion of <i>
eri-6</i> 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 <i>Polintons</i>. 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.