defile (v.)
c.1400, "to desecrate, profane;" mid-15c., "to make foul or dirty," alteration of earlier defoulen, from Old French defouler "trample down, violate," also "ill-treat, dishonor," from de- "down" (see de-) + foler "to tread," from Latin fullo "person who cleans and thickens cloth by stamping on it" (see foil (v.)).

The alteration (or re-formation) in English is from influence of Middle English filen (v.) "to render foul; make unclean or impure," literal and figurative, from Old English fylen (trans.), related to Old English fulian (intrans.) "to become foul, rot," from the source of foul (adj.). Compare befoul, which also had a parallel form befilen. Related: Defiled; defiling.
defile (n.)
"narrow passage," 1640s, especially in a military sense, "a narrow passage down which troops can march only in single file," from French défilé, noun use of past participle of défiler "march by files" (17c.), from de- "off" (see de-) + file "row," from Latin filum "thread" (see file (v.)). The verb in this sense is 1705, from French défiler.