Magnetic phase transitions play crucial roles in various material applications, including sensors, actuators, information storage, magnetic refrigeration, and so on. Typically, these magnetic phase transitions exhibit discontinuous first-order phase transitions. When a material undergoes a magnetic phase transition, it often exhibits simultaneous changes in both its crystal and electronic structures. However, the coupling relationship between the crystal structure and electronic structure during these phase transitions has not been well studied. This lack of understanding hinders our ability to integrate macroscopic physical phenomena with microscopic crystal and electronic structures. In this paper, we prepared single crystal and polycrystalline CeMn2Ge2 alloy, which has been extensively studied in recent years as a material of skyrmions. The relationships between the magnetic phase transition and the crystal structure of CeMn2Ge2 were investigated through magnetic measurements, variable-temperature X-ray diffraction (XRD), and experimental electron density analysis via the maximum entropy method (MEM). The results indicate that the antiferromagnetic phase transition at TN = 415 K is characterized by an increase in the intralayer Mn-Mn bond and a decrease in the Ge-Ge bond. More importantly, the ferromagnetic transition at TC = 315 K can be divided into two stages: the first stage involves the anisotropic transformation of Mn, and the second stage involves the electron enhancement of Mn. The combination of phase transition features and transport properties indicates strong anisotropy in CeMn2Ge2. Notably, our work reveals a coupling between a material's physical properties, crystal structure, and electronic structure. Our study offers a new approach for determining the origin of magnetic phase transitions and the causes of their physical properties in materials at the electronic level.