This paper reports the observation of the decays B(s)0→Ds1(2536)∓K± using proton-proton collision data collected by the LHCb experiment, corresponding to an integrated luminosity of 9fb−1. The branching fractions of these decays are measured relative to the normalisation channel B0→D0K+K−. The Ds1(2536)− meson is reconstructed in the D∗(2007)0K− decay channel and the products of branching fractions are measured to be B(Bs0→Ds1(2536)∓K±)×B(Ds1(2536)−→D∗(2007)0K−)=(2.49±0.11±0.12±0.25±0.06)×10−5, B(B0→Ds1(2536)∓K±)×B(Ds1(2536)−→D∗(2007)0K−)=(0.510±0.021±0.036±0.050)×10−5. The first uncertainty is statistical, the second systematic, and the third arises from the uncertainty of the branching fraction of the B0→D0K+K− normalisation channel. The last uncertainty in the Bs0 result is due to the limited knowledge of the fragmentation fraction ratio, fs/fd. The significance for the Bs0 and B0 signals is larger than 10σ. The ratio of the helicity amplitudes which governs the angular distribution of the Ds1(2536)−→D∗(2007)0K− decay is determined from the data. The ratio of the S- and D-wave amplitudes is found to be 1.11±0.15±0.06 and its phase 0.70±0.09±0.04 rad, where the first uncertainty is statistical and the second systematic.