The singly Cabibbo-suppressed decay Ds+ → K+π+π−π0 is observed by using a data set corresponding to an integrated luminosity of 6.32 fb−1 recorded by the BESIII detector at the centre-of-mass energies between 4.178 and 4.226 GeV. The first amplitude analysis of Ds+ → K+π+π−π0 reveals the sub-structures in this decay and determines the fractions and relative phases of different intermediate processes. The dominant intermediate process is Ds+ → K*0ρ+, with a fit fraction of (40.5 ± 2.8stat. ± 1.5syst.)%. With the detection efficiency based on our amplitude analysis, the absolute branching fraction for Ds+ → K+π+π−π0 is measured to be (9.75 ± 0.54stat.± 0.17syst.) × 10−3. [Figure not available: see fulltext.]. © 2022, The Author(s).