It has been used for colour printing for many, many years, but who (and when) first discovered that a bright pink colour (magenta), a light blue (cyan), yellow and black can be mixed to create almost all colours? How did they discover this?
(Or more correctly "CMY" - the Black (K) isn't strictly necessary)
According to Joe Scout the first company to use CMYK in printing was Eagle Printing Ink Company and the year was 1906. It was not until 1956 that it became a standard as a result of Pantone trying to streamline the workflow.
This however does not really answer who really invented/discovered the choice of colors, the first scientific literature to mention this appears to be published in 1908. Going deeper it appears that we have a significant problem. It seems that there is a certain ambivalence in the naming of colors. In certain later sources we see that cyan and magenta refereed to as blue and red even as late as 1950's. So language no longer works quite well searching for earlier sources and it becomes hard to follow the lead. Secondly pigments fade so we can not compare easily what they mean. Certainly lot of work of finding the primaries has been done from 18ths century. 
It has been fairly long known that the human eye was sensitive to 3 color wavelengths (called tristimulus values in scientific lore). Some sources attribute this as far back as 1613 . But certainly it was known and verified by mid 1800's see Youngâ€“Helmholtz theory. So the sensory primaries were known for quite some time. RGB primaries are chosen to closely match the 3 sensors in our eye. However, a paper does not transmit light, it reflects light. So a paper is usually white, representing maximum reflection. Each ink then subtracts one color off the palette since you need to be able to independently manipulate each RGB channel. This fact was known since Newton . So you need to find the inverse of RGB which simply is CMY. The black color is there mostly, and originally, to avoid registration problems as black is the most common body text color ink. Though black does make it easier to mix certain dark tones.
Of course CMYK printing predates RGB monitors by a comfortable margin of 60 years. CMYK is not derived from RGB but the intuition needed is the same. The authors must have known or indirectly inferred the inner workings of the eye's sensory apparatus. But its not nearly as simple as this as finding good pigments for the job is a journey on its own. Knowing what to look for is not the same as knowing what is there.
Scout, Joe, The History Of The CMYK Colour Model, Club Ink Blog, 2016-05-02. http://www.clubink.ca/blog/print/history-behind-cmyk-colour-model/ referenced 2016-06-07
Briggs, David. 2006. http://www.huevaluechroma.com/062.php
Weale, R. Ophthalmic Physiol Opt. 2007 Nov;27(6):525-6.