It's Elantris, by Brian Sanderson. It was published in 2006 and since then he's put out an even more popular (according to amazon) trilogy, plus he's ghostwriting the next Wheel of Time book. But the fact that this was his first book just makes it all the more incredible.
Here's a review from Amazon:
Sanderson's outstanding fantasy debut, refreshingly complete unto itself and free of the usual genre clichés, offers something for everyone: mystery, magic, romance, political wrangling, religious conflict, fights for equality, sharp writing and wonderful, robust characters. The godlike inhabitants of Elantris, once the capital of the land of Arelon, have degenerated into powerless, tortured souls, unable to die, after the city's magic inexplicably broke 10 years earlier. When the same curse strikes Prince Raoden of Arelon and he's imprisoned in Elantris, he refuses to surrender to his grim fate and instead strives to create a society out of the fallen and to unlock the secret that will restore the city's glory. Meanwhile, Princess Sarene of Kae (Arelon's new capital), who was betrothed to Raoden sight unseen, believes her intended has died. Officially declared his widow, she must use her political savvy and wit to protect Kae from malevolent forces without and within the city, chiefly Hrathen, a leader of the creepy Shu-Dereth faith, who aims to either convert Kae or destroy it within three months. The intrigue and excitement grow steadily in this smoothly written, perfectly balanced narrative; by the end readers won't want to put it down. As the blurb from Orson Scott Card suggests, Sanderson is a writer to watch.
I picked this up on a whim at the mall... the first book of the Mistborn trilogy had been recced by a store employee, but they were out of stock, so I grabbed this one instead. And I'm so happy I did!