About 12 to 15 years ago I read a book that started off as a sword and sorcery-style book about a land surrounded by a thick fog wall. I don't remember who wrote it or what it was called. If I remember right, people who were exiled were sent through the fog, never to be heard from again. Towards the end of the book, the hero was banished through the fog. On the other side, he found a sci-fi sort of setting with armies trying to find a way to penetrate the fog wall.
I'm pretty sure this was a trilogy. I want to say it was published by Tor, but I can no longer trust my memory on these things. I think the main hero had a sword or was born with an ability that made him immune to magic (or unable to cast it).