1560s, "sudden and apparently causeless turn of mind," of unknown origin. Perhaps it is from a dialectal survival of a word related to Middle English friken "to move nimbly or briskly," from Old English frician "to dance" [OED, Barnhart]. There is a freking attested in mid-15c., apparently meaning "capricious behavior, whims." Or perhaps from Middle English frek "eager, zealous, bold, brave, fierce" (see freak (n.2)).
The sense of "capricious notion" (1560s) and that of "unusual thing, fancy" (1784) preceded that of "abnormally developed individual or production" (first attested in freak of nature, 1839, which later was popular in variety show advertisements for bearded ladies, albinos, etc.; compare Latin lusus naturæ, which was used in English from 1660s). As "drug user" (usually appended to the name of the drug) it attested by 1945. The sense in health freak, ecology freak, etc. is attested from 1908 (originally Kodak freak "a camera buff"). Freak show is attested from 1887.