From support.apple.com:
"Delete mailboxes
WARNING: Deleting a mailbox permanently deletes the mailbox and its contents (including other mailboxes), and can’t be undone. If you use Time Machine to back up files on your Mac, you can use it to recover previous versions of a deleted mailbox.
- In the Mail app on your Mac, select a mailbox in the Mail sidebar.
- Choose Mailbox > Delete Mailbox.
- If you have problems deleting a mailbox on the server for an IMAP account, contact the provider of your account.
When you delete a Smart Mailbox, the messages it displayed remain in their original locations.
If you use the Finder to delete a mailbox, the change may not appear in Mail."