First recorded in 1150-1200,anyway is from the Middle English word ani wei. See any, way1

Usage note

The adverb anyway is spelled as one word: It was snowing hard, but we drove to the play anyway. The two-word phrase any way means “in any manner”: Finish the job any way you choose. If the words “in the” can be substituted for “any,” the two-word phrase is called for: Finish the job in the way you choose. If the substitution cannot be made, the spelling is anyway.

1560s, any way "in any manner;" variant any ways (with adverbial genitive) attested from c.1560. One-word form predominated from 1830s. As an adverbial conjunction, from 1859. Middle English in this sense had ani-gates "in any way, somehow" (c.1400).