As a new and efficient heating method, microwave has a great advantage in chemical catalysis and material processing. However, the non-uniformity of microwave heating has limited its application in the chemical industry. A multi-mode microwave cavity with moving metal wall is designed in this paper. In the heating process, the electric field distribution of the cavity is constantly changing by moving the metal wall of the cavity, thereby achieving the purpose of improving the heating uniformity. In the simulation, by using the moving mesh method, the simulation of the whole heating process can be realized by a continuous algorithm. The accuracy of the algorithm is verified by comparing with the electric field distribution of the cavity and reflection coefficient of the port with that of the discrete position. By comparing the temperature coefficient of variation (COV) of the heated material, it can be considered that the heating uniformity of the microwave multimode cavity with a moving metal wall is increased by 18%-38% compared to that of the fixed size multimode cavity. Meanwhile, we analyzed the effect of different metal wall movement modes on the heating effect, and concluded that one can choose the metal wall movement mode according to the properties of the material and other requirements.