The Old French source of the verb “patrol” was patouiller, and it then meant “to dabble in the mud.”
The supposition is that French soldiers detailed to guard a camp at night found that their duty seemed to consist of nothing but tramping interminably back and forth in the mud, and thus adopted this word to express in a slang sense the nature of the duty.
The spelling was altered to patrouiller in modern French, and it had then become an accepted military term, meaning, “to go the rounds, as the guard of a camp.”
England, which adopted many French military practices, took over this term also, but further altered it to patrol.