We use axisymmetric magnetohydrodynamic simulations to investigate the launching and collimation of jets emerging from the disc–magnetosphere boundary of accreting magnetized stars. Our analysis shows that the matter flows into the jet from the inner edge of the accretion disc. It is magnetically accelerated along field lines extending up from the disc and simultaneously collimated by the magnetic pinch force. In the reference run which we use for analysis, the matter in the jet crosses the Alfvén surface a few R* above the disc and the fast magnetosonic surface ∼13R* above the disc. At larger distances, the magnetic pressure is a few times smaller than the total matter pressure, but the magnetic force continues to accelerate and collimate the jet. In steady state, we observe a matter ejection-to-accretion ratio of ∼0.2. Across different simulation runs, we measure a range of half-opening angles between Θ≈ 4° and 20° at the top of the simulation region, depending on the degree of magnetization in the outflow. We consider the case of stars undergoing epochs of high accretion [such as EX Lupi (EXors), FU Orionis (FUORs) and Classical T Tauri Stars (CTTSs)] where the stellar magnetosphere is strongly compressed by the incoming accretion disc. For a typical EXor (mass 0.8 M⊙, radius 2 R⊙) accreting at ∼10−5 M⊙ yr−1, we measure poloidal velocities in the jet ranging from 30 km s−1 on the outer edge of the jet to more than 260 km s−1 on the inner edge. In general, the models can be applied to a variety of magnetized stars – white dwarfs, neutron stars and brown dwarfs – which exhibit periods of high accretion.