Devious
late 16th century: from Latin devius (from de- ‘away from’ + via ‘way’) + -ous. The original sense was ‘remote’; the later sense ‘departing from the direct route’ gave rise to the figurative sense ‘deviating from the straight way’ and hence ‘skilled in underhand tactics’.
wiktionary
1590s, "out of the common or direct way," from Latin devius "out of the way, remote, off the main road," from de via; from de "off" (see de-) + via "way, road" (see via). Compare deviate. Originally in the Latin literal sense; the figurative sense of "deceitful" is first recorded 1630s. Related: Deviously; deviousness. Figurative senses of the Latin word were "retired, sequestered, wandering in the byways, foolish, inconsistent."
etymonline
devious (adj.)
1590s, "out of the common or direct way," from Latin devius "out of the way, remote, off the main road," from de via; from de "off" (see de-) + via "way, road" (see via). Compare deviate. Originally in the Latin literal sense; the figurative sense of "deceitful" is first recorded 1630s. Related: Deviously; deviousness. Figurative senses of the Latin word were "retired, sequestered, wandering in the byways, foolish, inconsistent."