Pyramidal dislocations in magnesium (Mg) and other hexagonal close-packed metals play an important role in accommodating plastic strains along the c-axis. Bulk single crystal Mg only presents very limited plasticity in c-axis compression, and this behavior was attributed to out-of-plane dissociation of pyramidal dislocations onto the basal plane and resulted in an immobile dislocation configuration. In contrast, other simulations and experiments reported in-plane dissociation of pyramidal dislocations on their slip planes. Thus, the core structure and mode of dissociation of pyramidal dislocations are still not well understood. To better understand the dissociation behavior of pyramidal dislocations in Mg at room temperature, in this work, atomistic simulations were conducted to investigate four types of pyramidal dislocations at 300 K: edge and screw Py-I on {101¯1}, edge and screw Py-II on {112¯2} by using a modified embedded atom method (MEAM) potential for Mg and anisotropic elasticity dislocation model. The results show that when energy minimization was performed before relaxation, in-plane dissociation of edge dislocations on respective pyramidal plane could be obtained at room temperature for all four types of dislocation. Without energy minimization, the edge dislocations dissociated out-of-plane onto the basal plane. Calculations of potential energy and hydrostatic stress of individual atoms at the edge dislocation core show that the extraordinarily high energy and atomic stresses in the as-constructed dislocation structures caused the out-of-plane dissociation onto the basal plane. The core structures of all four types of pyramidal dislocation after in-plane dissociation were analyzed by computing the distribution of the Burgers vector.