c. 1400, "to desecrate, profane;" mid-15c., "to make foul or dirty," also "to rape, deflower," 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.1)).
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.