You can follow the article : Mail for Mac: Import or export mailboxes
Once the messages are in a new mailbox called Import in the Mail sidebar. You can drag folders and messages from the Import mailbox to new or existing mailboxes, then delete the Import mailbox.