An electronic apparatus with an active posture control function includes a body assembly, an accelerometer, a driving device and a controller. The body assembly includes a first body and a second body pivotally connected to the first body. The accelerometer mounted on the body assembly senses acceleration of the body assembly to output an acceleration signal. The driving device mounted on the body assembly drives at least one of the first body and the second body. The controller, mounted on the body assembly and electrically connected to the accelerometer and the driving device, receives the acceleration signal, judges whether the acceleration signal is higher than a predetermined level, and controls the driving device to adjust an included angle between the first body and the second body when the acceleration signal is higher than the predetermined level. |