The Guinea Pig is an animal that originated in South America. Guinea is a region in West Africa. Why are they called Guinea Pigs?
The simplest and most likely explanation is that Guinea was often used in English to describe exotic imports from overseas, even if they didn't actually come from Guinea. The Oxford English Dictionary lists Guinea corn (Indian millet), Guinea duck (Muscovy duck) Guinea hens (sometimes the North America Turkey) Guinea goose (Chinese goose) and Guinea wheat (Indian corn), as well as various plants and animals that actually came from Guinea.
The character of England's Guinea trade contributed to the confusion, since ships from England to Guinea often sailed on to the Americas before returning to England.
Speculative etymology based on the guinea coin seems improbable: the coin was first minted in 1663, but William Harvey seems to have referred to "Ginny-pigs" as early as 1653.