Slave fiction is a subgenre of BDSM fiction where the object of a fictional story is to show how someone adopts to the life of being someone else's slave. These stories are usually erotic which is part of the appeal for readers.
Normally these stories begin with an unwilling captured subject who is processed and aclimated to the life of a slave. Usually the fictional slave either willingly accepts their status as a slave after time, or somehow overcomes the odds and become freed in some manner. The freed slaves usually must use some combination of skill, intelligence, and strength to overcome their captors.
The majority of these stories are gay oriented and mostly contain "straight" captured subjects that are introduced to homosexual slavery by their captors. However, they are also represented in heterosexual BDSM fiction, such as the 5 Gor novels written from the viewpoint of newly enslaved Earth women ('Captive', 'Slave Girl', 'Kajira' and 'Dancer') or men ('Fighting Slave').
The popularity of these stories is probably because they provide an acceptable way of exploring nonconsensual relationships, whilst still leading to a 'happily ever after' ending (one way or the other...) Additionally, they provide a setting in which to play out many of the themes of Bondage, SM and D/s from real-life BDSM as a plausible part of the narrative.