Adaptive mesh refinement(AMR) cosmological hydrodynamics simulations play an important role in the study of structure formation of different scales from galaxy clusters to first stars in the past ten years. Its ability to achieve very high resolution in large scale simulations with relatively small computer resources has helped us to understand the first stars formed in our Universe. The possible effects of magnetic fields have been largely ignored. It is well established that magnetic fields are present on different scales, from intracluster medium to interstellar medium. The origin and evolution of these magnetic fields and their role on the structure formation are still unclear. So, it is imperative to include magnetic fields into current hydrodynamics AMR cosmology code. In this paper, we present the newly developed MHD version of the Enzo, which is wildly used in the study of first stars [1]}, [2]}, [3]}.
