This is definitely not The Neverending Story!
This story was probably read sometime in the last millennium (possibly in the 1980s) in a science fiction or fantasy magazine that probably had large pages like most fanzines. It could have have been a fanzine but I think it was a professional magazine.
The young protagonist in the story whose name I forget spent months or years at the court of the fictional child Empress Y'golnac, or however her named was spelled, (reigning over a fictional empire whose name I forget) long enough that she may have become the teen Empress Y'golnac or even the adult Empress Y'golnac. And I don't remember if the protagonist ever met the empress.
The story may have been part of a series since I remember that at the end the protagonist departed the court and it was said that his education was complete. I remember thinking that his education to become a wandering rouge, swashbuckler, thief, assassin, adventurer, or mercenary seemed rather complete, but his education to become a wandering philosopher, tradesman, scholar, missionary, wizard, or any sort of a good and useful person, seemed woefully incomplete.