Wait, what about Sherlock?

Okay, this part is great, actually, because it’s part contemporary fanfic history and part historical fanfic. Let’s start with Sir Arthur Conan Doyle himself. Generally speaking, Sherlock is considered the first contemporary fandom, not only because of the massive fandom that spawned around it, but because of the fanwork that occurred around Doyle’s characters.
So, because Sherlock Holmes stories were incredibly popular, serialized, and the main character eventually killed off by Doyle as he became less and less interested in his work, fandom kicked in. Fanfiction was published in serialized magazines, although back then it wasn’t called fanfic, it was called pastiche.