The Gargantua and Pantagruel series by French renaissance writer François Rabelais isn't explicit in BDSM content but it's perhaps the oldest example a libertine lifestyle in classic literature. Despite the antiquity of these texts, they remain highly entertaining for their bawdy humor. His books were banned by the Roman Catholic Church in his time but these days, you'll find e-text copies at Project Gutenberg and biographical information at Wikipedia.
The unabridged version of Tales of the Arabian Nights also contains many episodes of slavery and forced submission. Other 'oriental' works also translated by Sir Richard Burton, such as The Perfumed Garden, also contain BDSM overtones. Burton himself was a fascinating person who enjoyed kinky diversions. Sadly for history, his wife burned many of his unpublished manuscripts shortly after his death.
Pygmalion, a play by George Bernard Shaw (and based on the ancient Greek myth of Pygmalion), is a classic story of dominance and submission, though this sub-text was more likely simply a reflection of Victorian times and class differences. The movie My Fair Lady starring Audrey Hepburn and Rex Harrison, based on Shaw's play, is in my opinion the best D/s film ever made.