Very few middle schools in the United States (or most other countries) have on-campus dormitories. Middle schools are typically designed for students who live close enough to commute daily. Dormitories are much more common at boarding schools, which are usually private and often cater to high school students and sometimes have a younger age range that might include a few middle schoolers in a small program, but this is not typical.
If you're looking for a middle school with boarding facilities, you'll need to specifically search for boarding schools that include grades 6-8 (or equivalent). These are usually expensive private institutions. You will need to do an online search specifying your location (e.g., "boarding schools with middle school in New England") to find options near you.