The resonant-state expansion, a recently developed powerful method in electrodynamics, is generalized here for open optical systems containing magnetic, chiral, or bi-anisotropic materials. It is shown that the key matrix eigenvalue equation of the method remains the same, but the matrix elements of the perturbation now contain variations of the permittivity, permeability, and bi-anisotropy tensors. A general normalization of resonant states in terms of the electric and magnetic fields is presented.