late Old English cepan "to seize, hold," also "to observe," from Proto-Germanic *kopijanan, but with no certain connection to other languages. It possibly is related to Old English capian "to look," from Proto-Germanic *kap- (cepan was used c.1000 to render Latin observare), which would make the basic sense "to keep an eye on."
Sense of "preserve, maintain" is from mid-14c. Meaning "to maintain in proper order" is from 1550s; meaning "financially support and privately control" (usually in reference to mistresses) is from 1540s. Related: Kept; keeping.