Viscoelastic fluids widely exist in nature and industrial production, and the study of their complex rheological properties has important academic value and application significance. In this work, an improved smoothed particle hydrodynamics (SPH) method is proposed to numerically simulate the viscoelastic flow based on the eXtended Pom-Pom (XPP) model. In order to improve the accuracy of the calculation, a kernel gradient correction discrete format without kernel derivative calculation is adopted. In order to prevent fluid particles from penetrating the solid wall, an enhanced boundary processing technology is proposed. To eliminate the tensile instability, an artificial stress is coupled into the momentum equation of conservation. Based on the XPP model, the viscoelastic Poiseuille flow and the viscoelastic droplet impacting solid wall problem are simulated by using the improved SPH method. The effectiveness and advantages of the improved SPH method are verified by comparing the SPH solutions with the solutions from the analytical method or finite difference method. The convergence of the improved SPH method is further evaluated by using several different particle sizes. On this basis, the influences of rheological parameters such as Reyonlds number <i>Re</i>, Weissenberg number <i>Wi</i>, solvent viscosity ratio <i>β</i>, anisotropy parameter <i>α</i>, relaxation time ratio <i>γ</i> and molecular chain arm number <i>Q</i> on the flow process are analyzed in depth. For the viscoelastic Poiseuille flow, the bigger the value of <i>Re</i>, <i>Wi</i>, and <i>α</i>, the larger the steady-state velocity is; the larger the value of <i>γ</i> and <i>Q</i>, the smaller the steady-state velocity is; the larger the value of<i> β</i>, the weaker the velocity overshoot is, but it does not affect the steady-state velocity. For the viscoelastic droplet problem, the larger the value of <i>Re</i> and <i>Wi</i>, the faster the droplet spreads; the larger the value of <i>β</i>, the weaker the droplet shrinkage behavior is, but it does not affect the final spreading width of droplet; the larger the value of <i>α</i>, the larger the droplet’s spreading width is; the larger the value of<i> γ</i> is, the stronger the droplet shrinkage behavior is; the larger the value of <i>Q</i>, the weaker its influence on the droplet’s spread width is. The improved SPH method in this paper can effectively describe the complex rheological properties and the free surface variation characteristics of viscoelastic fluid based on XPP model.