A branching fraction measurement of the B0→Ds+π- decay is presented using proton–proton collision data collected with the LHCb experiment, corresponding to an integrated luminosity of 5.0fb-1. The branching fraction is found to be B(B0→Ds+π-)=(19.4±1.8 ± 1.3 ± 1.2) × 10 - 6, where the first uncertainty is statistical, the second systematic and the third is due to the uncertainty on the B→ D-π+, Ds+→K+K-π+ and D-→ K+π-π- branching fractions. This is the most precise single measurement of this quantity to date. As this decay proceeds through a single amplitude involving a b→ u charged-current transition, the result provides information on non-factorisable strong interaction effects and the magnitude of the Cabibbo–Kobayashi–Maskawa matrix element Vub. Additionally, the collision energy dependence of the hadronisation-fraction ratio fs/ fd is measured through B¯s0→Ds+π- and B→ D-π+ decays.