Shimming position and amount have a significant influence on the weight and mechanical performance of the thin-walled product that having assembly gap during aerospace components assembly process. An analytical method for assembly-induced deformation prediction of the bolted composite joints with assembly gap was developed. The assembly-induced deformation under the preloading force was computed as bending deformation and bolt head compression deformation by evaluating whether assembly gap can be eliminated and whether the calculating point is within the conical and spherical envelope of the fastener. The proposed method was validated by the preloading experiment of three-bolt composite joints with relative error less than 10%. Then it was applied to analyse the assembly-induced deformation of a composite box structure including composite spars and skins. Under the guide of the analytical result, shimming assembly of the composite box structure was carried out. The proposed analytical method has a good application prospect to predict the assembly-induced deformation during preloading process for composite/composite joints or composite/metal joints.