E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
To fall foul of one is to make an assault on someone. A sea term. A rope is said to be foul when it is entangled; and one ship falls foul of another when it runs against her and prevents her free progress. Hence to run up against, to assault.