|Interesting question. The following is from the Oxford English Dictionary:
The two earliest statements as to its origin were published in 1789: Thomas Anburey, a British officer who served under Burgoyne in the War of Independence, in his Travels II. 50 derives Yankee from Cherokee eankke slave, coward, which he says was applied to the inhabitants of New England by the Virginians for not assisting them in a war with the Cherokees; William Gordon in Hist. Amer. War states that it was a favourite word with farmer Jonathan Hastings of Cambridge, Mass., c1713, who used it in the sense of ‘excellent’. Appearing next in order of date (1822) is the statement which has been most widely accepted, viz. that the word has been evolved from North American Indian corruptions of the word English through Yengees to Yankees (Heckewelder, Indian Nations iii. ed. 1876, p. 77); compare Yengees n.
Perhaps the most plausible conjecture is that it comes from Dutch Janke , diminutive of Jan John, applied as a derisive nickname by either Dutch or English in the New England states (J. N. A. Thierry, 1838, in Life of Ticknor, 1876, II. vii. 124). The existence of Yank(e)y , Yankee , as a surname or nickname (often with Dutch associations) is vouched for by the following references:
1683 Cal. State Papers, Colon. Ser. (1898) 457 They [sc. pirates] sailed from Bonaco..; chief commanders, Vanhorn, Laurens, and Yankey Duch.
1684 Cal. State Papers, Colon. Ser. (1898) 733 A sloop..unlawfully seized by Captain Yankey.
1687 Cal. State Papers, Colon. Ser. (1899) 456 Captains John Williams (Yankey) and Jacob Everson (Jacob).
1687–8 MSS. Earl of Dartmouth in 11th Rep. Royal Comm. Hist. MSS (1887) App. v. 136 The pirates Yanky and Jacobs.
1697 W. Dampier New Voy. around World iii. 38 Here we met with Captain Yanky.
1725 Inventory of W. Marr of Carolina in N. & Q. 5th Ser. X. 467 Item one negroe man named Yankee to be sold.