In recent years, the scale of loans in China has been increasing, and so has the credit risk. Yet the credit risk assessment system is still in the initial stage of development. To improve the accuracy of default loan prediction, this paper proposes ISSA-XGBoost model based on an improved way of passing input parameters. The model uses the Sparrow Search Algorithm (SSA) to optimize the parameters of eXtreme Gradient Boosting (XGBoost). Since the search strategy of SSA includes convergence to the origin direction, this paper changes the form of input parameters. In the form, the closer the parameters in SSA are to the origin, the more XGBoost under these parameters can avoid overfitting. SSA searches the optimal with the changed parameter form and outputs feasible solutions. Then, the model transforms their solutions back to the original form and inputs them into XGBoost. After the above processes, SSA can avoid overfitting while searching for optimal solutions. Using the improved SSA to optimize XGBoost, the ISSA-XGBoost loan default prediction model is established. The empirical result shows that the model outperforms SSA-XGBoost under the four metrics: ACC, AUC, KS, and BS. And it is significantly better than that of XGBoost optimized by Particle Swarm Optimization (PSO-XGBoost). At the same time, compared with SSA-XGBoost, the AUC score difference between the training set and the test set of ISSA-XGBoost is smaller, which indicates that ISSA-XGBoost can better avoid overfitting.