A general class of multi-term nonlinear fractional initial value problems involving variable-order fractional derivatives are considered. Some sufficient conditions for the existence and uniqueness of exact solution are established. An hp-version spectral collocation method is presented for solving the problem in numerical frames. It employs the shifted Legendre-Gauss interpolations to conquer the influence of the nonlinear term and the variable-order derivatives. The most remarkable feature of the method is its capability to achieve higher accuracy by refining the mesh and/or increasing the degree of the polynomial. The rigorous error estimates are derived for the problem with smooth solutions on arbitrary meshes and weakly singular solutions on quasi-uniform meshes. Numerical results are given to support the theoretical conclusions.