one-word form is common from 1830s; in two words from 1560s, "in any manner," also any ways (with adverbial genitive); see any + way (n.). As an adverbial conjunction, from 1859.
Middle English in this sense had ani-gates "in any way, somehow" (c. 1400), also on anikinnes wise "in any way or manner" (c. 1200), and Late Old English had on enige wisan "in any wise, in any manner." As a prepositional phrase, in any way is from late 14c.