By hooke or crooke.
John Heywood (1497?-1580?) English playwright and epigrammist
Proverbes, Part 1, ch. 11 (1546)
(Source)
The phrase most likely derives from English tenant rights to gather firewood "by hook or by crook" -- as much loose timber as could be pulled down from branches by a (shepherd's) crook, or cut with from underbrush by a (pruning) billhook. The phrase first appears in the 14th Century.