The traditional Simultaneous Localization and Mapping (SLAM) systems are based on the strong static assumption, and their performance will degrade significantly due to the presence of dynamic objects located in dynamic environments. To decrease the effects of the dynamic objects, based on the ORB-SLAM2 system, a novel dynamic semantic SLAM system called MOR-SLAM is presented using a mask repair method, which can accurately detect dynamic objects and realize high-precision positioning and tracking of the system in dynamic indoor environments. First, an instance segmentation module is added to the front end of ORB-SLAM2 to distinguish dynamic and static objects in the environment and obtain a preliminary mask. Next, to overcome the under-segmentation problem in instance segmentation, a new mask inpainting model is proposed to ensure that the integrity of object masks, which repairs large objects and small objects in the image with the depth value fusion method and morphological method, respectively. Then, a reliable basic matrix can be obtained based on the above-repaired mask. Finally, the potential dynamic feature points in the environment are detected and removed through the reliable basic matrix, and the remaining static feature points are input into the tracking module of the system to realize the high-precision positioning and tracking in dynamic environments. The experiments on the public TUM dataset show that, compared with ORB-SLAM2, the MOR-SLAM improves the absolute trajectory accuracy by 95.55%. In addition, compared with DynaSLAM and DS-SLAM on the high-dynamic sequences (fr3/w/rpy and fr3/w/static), the MOR-SLAM improves the absolute trajectory accuracy by 15.20% and 59.71%, respectively.