Chain of Command
How about adapting an idea from the TNG two parter "Chain of Command?" The Captain is an expert in the field of [fill in the blank] and is called away to be part of a top secret mission. However, instead of having another NPC become CO, like the lovely Capt. Jellico, let the XO take over. If it all goes well, you can always have the Captain turn up MIA or KIA. You could even have the crew be part of the mission to rescue their Captain.
Of course, if you want your crew to respect your NPC Captain more, bring in a Jellico type for awhile for any of the aforementioned reasons.
Another idea is that the Captain himself is being promoted, either with a new position (an instructor at Starfleet or that type of thing) or he is being promoted himself.
Good luck on your story
<i>"On Earth there is no poverty, no crime, no war. You look out the window of Starfleet headquarters, and you see paradise. Well, it's easy to be a saint in paradise."</i> Benjamin Sisko