McCoy's parents were runaway slaves from Kentucky who escaped on the underground railroad. When he was three, his family moved back to the United States to Detroit, Michigan. He had 11 brothers and sisters. Elijah was fascinated by machinery. He studied engineering in Scotland.
McCoy invented the automatic lubricator, which oils the engines of boats, trains, and so on. His "lubricating cup" for locomotives from 1872 was a great boon for the railroad industry, allowing trains to run faster and more profitably with much less need to stop for lubrication and maintenance. He also developed at least 56 other patented devices, including a folding ironing board and an automatic sprinkler.
Elijah McCoy died in Detroit at the age of 85.
According to some sources, the saying the real McCoy, meaing the real thing, derives from Elijah: many of his inventions were the basis of inferior copies. Railroad engineers would enquire if a locomotive was equipt with "the real McCoy"; if so they knew it could be driven with confidence.