Afoul means into conflict or entanglement with something. Run afoul of the law, fell afoul of him, afoul of the rules.
It occurs almost only in run afoul of and fall afoul of, and it is American — British English says fall foul of. The origin is nautical: two ropes or ships are afoul when they are tangled, which is exactly the image. Note that a- here means on, as in aboard.
1adverbafoulInto conflict or entanglement with something.
“The company ran afoul of the law by selling unsafe toys.”
afoul is a state of conflict.
A- plus foul, from the nautical sense of ropes or vessels being tangled. Aboard and ashore use the same a-.
Proto-Indo-European
*puH- — foul, rotten
Proto-Germanic
*fūlaz — foul, rotten
Proto-West Germanic
*fūl
Old English
fūl — foul, dirty, unclean, impure, vile, corrupt, rotten, stinking, guilty
Middle English
ffoul
English
foul
English, today
afoul
From a- + foul. foul Middle English ffoul, foul, foull, fowel, fowle, fuyle, voul, vul, from Old English fūl (“foul, dirty, unclean, impure, vile, corrupt, rotten, stinking, guilty”), from Proto-West Germanic fūl, from Proto-Germanic fūlaz (“foul, rotten”), from Proto-Indo-European puH- (“foul, rotten”). 2 Cognate with gmw-cfr fuul (“putrid, rotten; lazy, workshy”), cim baul, vaul (“putrid, rotten”), Dutch vuil (“dirty, foul; lewd, obscene; dishonorable; illegal”), German faul (“foul, putrid, rotten; lazy”), Yiddish פֿױל (“putrid; lazy”), Danish ful (“nasty, ugly”), Icelandic fúll (“foul, rotten, sullen”), Norwegian Bokmål and Norwegian Nynorsk ful (“clever, sly”), and Swedish ful (“ugly; bad, dirty”), Gothic 𐍆𐌿𐌻𐍃 (“fetid, foul, putrid”), and through Indo-European, with Latin puter (“decaying, rotten; friable, crumbling”), Greek πύο, πύον (“pus”), Albanian fëlliq (“to make dirty, sully”), Latvian pūt (“to rot”), Lithuanian pūti (“to rot”), Armenian փուտ (“rottenness”), Persian پوده (“rubbed, worn; foul, rotten; empty, hollow”), Sanskrit पूयति (“to become foul; to stink”). More at putrid.
Etymology from Wiktionary, CC BY-SA