This paper describes the implementation of wearable AHRS for an electromagnetic motion capture system that can trace and analyze human motion on the principal nine axes of inertial sensors. The module provides a three-dimensional (3D) attitude and heading angles combining MEMS gyroscopes, accelerometers, and magnetometers based on the extended Kalman filter, and transmits the motion data to the 3D simulation via Wi-Fi to realize the unrestrained movement in open spaces. In particular, the accelerometer in AHRS is supposed to measure only the acceleration of gravity, but when a sensor moves with an external linear acceleration, the estimated linear acceleration could compensate the accelerometer data in order to improve the precision of measuring gravity direction. In addition, when an AHRS is attached in an arbitrary position of the human body, the compensation of the axis of rotation could improve the accuracy of the motion capture system.