It's based on 'Final Reward', just as the title says.
You can find the story in a few of the short story collections, most recently "Blink of the Screen". They've been reasonably faithful to the story, of course with a few extra embellishments, but a lot of the jokes are directly from the story.
Final Reward is about fantasy novelist Kevin Dogger killing off his male-ego-wish-fulfillment character Erdan the Barbarian, only to wake up and find Erdan on his doorstep the next morning, come to "meet his maker".