I had the same problem where my personal mailboxes (that I had created prior to even installing El Capitan and that had been under On My Mac in Mail) just disappeared several weeks after upgrading to Sierra. I did some of what muzz63 did. I created a new mailbox under On My Mac, since On My Mac had disappeared as well. I searched in ~/Library/Mail/V4 and found all my mailboxes I had previously created in a folder in V4. (FYI to find ~/Library/Mail, open Finder, click on Go, click on Go to Folder, type in ~/Library/Mail.) I also had a V2 folder but there really wan't anything in it. There was no V3 folder. Since I now knew were my mailboxes were in the V4 folder, I noted the long name of that folder (it consists of letters and numbers - example: FFD2538B-3FCC-4194-9195-A1D3F3D28075[boat.mbox] with boat.mbox being the name of the mailbox). I skipped all the part that muzz63 did of opening the Time Machine from Finder, dragging the smallest file from the backup of El Capitan, etc. From finding out the file name in ~/Library/Mail/V4, I went directly to opening up Mail. I clicked on File, and then clicked on Import Mailboxes. I clicked on Apple Mail, clicked on Continue. (Since you hopefully just searched ~/Library, a box should open with the Library and its folders located therein, or it should be listed in Recent Places.) I scrolled down to Mail and clicked on Choose. I unchecked all the boxes except for those of the files of the mailboxes I wanted to import (example: FFD2538B-3FCC-4194-9195-A1D3F3D28075[boat.mbox], etc.), and then I clicked on Continue. All the mailboxes I imported were put in a folder called Import under On My Mac in Mail. I then just moved those mailboxes out of the folder and directly under On My Mac. Everything was back that had been there for years.
It may have been a filter was set, but when I am in Mail and go to View, there is nothing about disabling filters.