Next-generation plasma-based accelerators can push electron bunches to gigaelectronvolt energies within centimetre distances1,2. The plasma, excited by a driver pulse, generates large electric fields that can efficiently accelerate a trailing witness bunch3-5, enabling the realization of laboratory-scale applications ranging from high-energy colliders6 to ultrabright light sources7. So far, several experiments have demonstrated large accelerations8-10 but the resulting beam quality, particularly the energy spread, is still far from state-of-the-art conventional accelerators. Here we show the results of a beam-driven plasma acceleration experiment where we used an electron bunch as a driver followed by an ultrashort witness bunch. By setting a positive energy chirp on the witness bunch, its longitudinal phase space is rotated during acceleration, resulting in an ultralow energy spread that is even lower than the spread at the plasma entrance. This result will significantly impact the optimization of the plasma acceleration process and its implementation in forthcoming compact machines for user-oriented applications.