A 3D swing simulation electronic candle lamp, comprising a retaining device and a swing device, the swing device being installed on the retaining device, the swing device being able to swing freely in an upright direction, a fake flame being provided and retained on the swing device, wherein the swing device comprises a power mechanism, a transmission mechanism and a swing assembly, the fake flame is fixedly connected with the swing assembly, and the power mechanism drives the swing assembly through the transmission mechanism, the 3D swing simulation electronic candle lamp further comprising a battery, a controller, and a luminous member, characterized in that the fake flame has a first accommodation room therein, the luminous member being disposed in the first accommodation room, the luminous member being able to shine after electrified, the battery, the controller, and the luminous member being electrically connected in sequence, the fake flame being made of a light-pervious material, the controller being electrically connected with a control end of the power mechanism, wherein the retaining device comprises a support block fixed on an upper end of the retaining device, an upper end of the support block is a spherical point, the spherical point of the upper end of the support block functions as a swing fulcrum of the swing device; the swing device comprises a swing frame, the fake flame is retained at an upper end of the swing frame, the swing frame is provided with a curved recess to mate with the upper end of the support block, and the spherical point of the support block is incorporated with the curved recess, and wherein a bottom of the swing frame is provided with a first magnetic member, the power mechanism is a drive motor having the control end electrically connected with the controller, the transmission mechanism comprises a rotary pendant which is fixedly connected with a power output shaft of the drive motor, one end of the rotary pendant extends toward the first magnet member, and an extension end of the rotary pendant is provided with a second magnet member. wherein the swing device comprises a power mechanism, a transmission mechanism and a swing assembly, the fake flame is fixedly connected with the swing assembly, and the power mechanism drives the swing assembly through the transmission mechanism, the 3D swing simulation electronic candle lamp further comprising a battery, a controller, and a luminous member, characterized in that the fake flame has a first accommodation room therein, the luminous member being disposed in the first accommodation room, the luminous member being able to shine after electrified, the battery, the controller, and the luminous member being electrically connected in sequence, the fake flame being made of a light-pervious material, the controller being electrically connected with a control end of the power mechanism, wherein the retaining device comprises a support block fixed on an upper end of the retaining device, an upper end of the support block is a spherical point, the spherical point of the upper end of the support block functions as a swing fulcrum of the swing device; the swing device comprises a swing frame, the fake flame is retained at an upper end of the swing frame, the swing frame is provided with a curved recess to mate with the upper end of the support block, and the spherical point of the support block is incorporated with the curved recess, and wherein a bottom of the swing frame is provided with a first magnetic member, the power mechanism is a drive motor having the control end electrically connected with the controller, the transmission mechanism comprises a rotary pendant which is fixedly connected with a power output shaft of the drive motor, one end of the rotary pendant extends toward the first magnet member, and an extension end of the rotary pendant is provided with a second magnet member.