In this paper, a data fusion based generalized Kalman filter with unknown input method (GKF-UI/GEKF-UI) is proposed for the identification of joint structural state and unknown earthquake ground motion. In the proposed method, structural motion equations are established in relative/absolute coordinate system while the observation equations are structural absolute responses. The analytical derivation of the proposed method is a direct extension of the classical Kalman filter (KF), and data fusion of partially measured acceleration and displacement/strain responses are used to avoid the drifts in the estimated structural state vector and unknown earthquake excitations. An identification problem is often composed of different combinations of aspects, including: (1) structural parameters are known or unknown; (2) the structure is linear or nonlinear; (3) the coordinate system is relative or absolute. Numerical examples will fully consider the various combinations to fully verify the effectiveness of the proposed GKF-UI/GEKF-UI method in different types of problems. Moreover, a lab shear frame model under shake table test is also used to validate the proposed approach. After the identification of the seismic ground motion is performed, the random characteristics of the sample can be further identified.