Board Thread:General Discussion/@comment-26335203-20160717052132/@comment-1824272-20160717085547

Fanfiction is one person creating new material out of pre-existing material, and placing it into the same universe as that pre-existing material. In the terms of copyright law, at least in the United States and other countries who have similar copyright laws, that person owns the material but not in the context of the pre-existing material, and the use of the pre-existing material is copyrighted and must follow the copyright holder's licensing.

tl;dr Fanfiction is a gray area but it's mostly defined as property of the copyright holders of the original work from which it's based.

DMCA has nothing to do with this, for the record. DMCA just protects against services and providers, like Wikia, where that content is. If, for example, Viacom wanted to close all fanfiction wikis related to Spongebob Squarepants, DMCA states that they cannot hold Wikia responsible for that content.