"The Real McCoy" is such a popular, long-lived meme that it is very difficult to peg the exact origin. Two of the most popular suggested sources are the American boxer mentioned in riverrun's writeup and Canadian inventor Elijah McCoy. If you are displeased with the idea of linguistic drift (/memetic drift), then by all means, accept one of those sources. However be advised that you will be going against the Gospel According to the Oxford English Dictionary.
The OED believes that "the real McCoy" is an Americanisation1 of the Scottish phrase "the real MacKay" used in a letter by R.L. Stevenson in 1883. According to numerous Internet sources, he was appropriating the advertising slogan adopted by G. Mackay & Co. (a Edinburgh or Glasgow1 whisky distiller possibly established in 1856) in 1870. According to at least one source, Elijah McCoy didn't invent his oil dispenser till 1873.2
The two other reasonable sources I've read about are the The Hatfield and McCoy Family Feud and whisky smuggling during prohibition3. There are also a number of other theories that have not been reproduced, mostly involving product authenticity. It seems likely that this phrase was actually used in a number of contexts, reinforcing its popularity and obfuscating its origin.
1: The forementioned theories are probably the origin of the Americanisation but not the original source of the phrase.
2: Not a clear consensus. My searches for the company only return discussions of the topic of this node.
3: This is so close that it seems possible that the phrase was invented in two contexts simultaneously (like so many scientific discoveries). Clearly this issue requires an actual scholar's attention.
4: Warning: this entire writeup may be biased by the authors' fondness for stories of alcohol lore.