Context. Many scenarios have been proposed to avoid known difficulties in planetesimal formation such as drift or fragmentation barriers. However, in these scenarios planetesimals in general only form at some specific locations in protoplanetary discs. On the other hand, it is generally assumed in planet formation models and population synthesis models that planetesimals are broadly distributed in the protoplanetary disc. Aims. We propose a new scenario in which planetesimals can form in broad areas of these discs. Planetesimals form at the gas pressure bump formed by a first-generation planet (e.g. formed by pebble accretion) and the formation region spreads inward in the disc as the planet migrates. Methods. We used a simple 1D Lagrangian particle model to calculate the radial distribution of pebbles in the gas disc perturbed by a migrating embedded planet. We consider that planetesimals form by streaming instability at the points where the pebble-to-gas density ratio on the mid-plane becomes larger than unity. In this work, we fixed the Stokes number of pebbles and the mass of the planet to study the basic characteristics of this new scenario. We also studied the effect of some key parameters, such as the gas disc model, the pebble mass flux, the migration speed of the planet, and the strength of turbulence. Results. We find that planetesimals form in wide areas of protoplanetary discs provided the flux of pebbles is typical and the turbulence is not too strong. The planetesimal surface density depends on the pebble mass flux and the migration speed of the planet. The total mass of the planetesimals and the orbital position of the formation area strongly depend on the pebble mass flux. We also find that the profile of the planetesimal surface density and its slope can be estimated by very simple equations. Conclusions. We show that our new scenario can explain the formation of planetesimals in broad areas. The simple estimates we provide for the planetesimal surface density profile can be used as initial conditions for population synthesis models.