Ed Greenwood did essentially this.True AFAIK, but I think (hope) it's easy to get around if you want to publish your D&D fanfic . . . . just include some game stats and info!
A fun product might be a combo of a novella, gazetteer, and game bits (adventure, monsters, items, spells, player options, etc).