Mailbox emptied and refilled
Something similar happened to me a couple of days ago. My MacBook runs on Tiger so I don't have Time Machine and I hadn't backed everything up for a few days - in other words, if I couldn't get back to where I was before I tried to rename the mailbox, I would lose a lot of valuable emails.
What had happened when I tried to rename the critical mailbox was that the mailbox appeared to acquire a greyed-out duplicate. The renamed, active mailbox lost all of its sub-folders (sub-mailboxes?) except the one I was in. That particular sub-folder still showed its message (email) headers, but each email had lost its contents and showed the following error message:
"The message from ... has not been downloaded from the server. You need to take this account online in order to download it."
All the missing sub-folders were sitting in the greyed-out phantom mailbox bearing the old name, and they were showing no emails at all.
To add to the fun, the Undo button in the Edit menu was greyed out too, so I couldn't reverse the process.
What I did was to rebuild each empty sub-folder (using the Rebuild command in the Mailbox menu). All the missing emails reappeared intact, so I then moved each sub-folder across from the phantom mailbox to the active (renamed) one.
The one remaining sub-folder that hadn't vanished I moved over to the phantom mailbox, then rebuilt it too and moved it back. I was then able to delete the now empty spare mailbox and back up the whole lot.
I can't say if that will work on your system, but it did on mine (Mail 2.1.3, OS X 10.4.11)