cocoa: [18] Like chocolate, cocoa came to English from the Nahuatl language of the Aztec people. Their cacahuatl meant ‘beans of the cocoa tree’. Its first element was borrowed into Spanish as cacao. This was adopted by English in the 16th century, and remained the standard form until the 18th century, when it was modified to cocoa. Originally it was pronounced with three syllables (/ko-ko-a/), but confusion with the coco of coconut (which was also sometimes spelled cocoa) led to the current twosyllable pronunciation. [cocoa etymology, cocoa origin, 英语词源]
powder from cacao seeds, 1707, corruption (by influence of coco) of cacao. The printing of Johnson's dictionary ran together the entries for coco and cocoa, fostering a confusion that never has been undone.