"The most important phases of the sense development of this word may be summed up as follows: 'inhabitant of a farm; peasant; churl, boor; clown; miser; knave, scoundrel.' Today both Fr. vilain and Eng. villain are used only in a pejorative sense." [Klein]
Meaning "character in a novel, play, etc. whose evil motives or actions help drive the plot" is from 1822. Villainous is recorded from c.1300, from O.Fr. vileneus; villainy (early 13c.) is from O.Fr. vilanie.Edgar: I know thee well: a serviceable villain,
As duteous to the vices of thy mistress
As badness would desire.
"King Lear," Act IV, Scene vi
"There is no proper name for it that I knowe, but that sertayne men of Captayne Haukinses doth call it a 'sharke' " [handbill advertising an exhibition of the specimen, 1569]
The meaning "dishonest person who preys on others," though only attested from 1599 (sharker in this sense is from 1594), may be the original sense, later applied to the large, voracious marine fish. It is possibly from Ger. Schorck, a variant of Schurke "scoundrel, villain," agent noun of M.H.G. schürgen (Ger. schüren) "to poke, stir." The Eng. word was applied to voracious or predatory persons, on the image of the fish, from 1707 (originally of pick-pockets); loan shark is attested from 1905. Sharkskin was used for binding books, etc. As the name of a type of fabric held to resemble it, it is recorded from 1932.