After I file for divorce, do I have to continue to live in North Carolina?

It depends. If both parties live in North Carolina and the other party stays in North Carolina, then you can leave the state and still have North Carolina retain jurisdiction over the divorce. If both parties reside in North Carolina, but different counties and you (as the plaintiff) leave the state, your spouse could petition the court to remove the case to the county where he/she resides.