Accurate estimation of noise parameters is critical for optimal filter performance, especially in systems where true noise parameter values are unknown or time-varying. This article presents a quaternion left-invariant extended Kalman filter (LI-EKF) for attitude estimation, integrated with an adaptive noise covariance estimation algorithm. By employing an iterative expectation-maximization (EM) approach, the filter can effectively estimate both process and measurement noise covariances. Extensive simulations demonstrate the superiority of the proposed method in terms of attitude estimation accuracy and robustness to initial parameter misspecification. The adaptive LI-EKF's ability to adapt to time-varying noise characteristics makes it a promising solution for various applications requiring reliable attitude estimation, such as aerospace, robotics, and autonomous systems.