Yrast states up to (6+) in the neutron-rich 40S nucleus have been studied using binary grazing reactions produced by the interaction of a 215 MeV beam of 36S ions with a thin 208Pb target. The novel experimental setup that combines the large acceptance magnetic spectrometer, PRISMA, and the high-efficiency γ-ray detection array, CLARA, was used. A new γ-ray transition at an energy of 1572 keV was observed and tentatively assigned to the (6+)→(4+) transition. A comparison of experimental observations and the results of large-scale 0ℏω sd−pf shell-model calculations indicates that one- and two-proton excitations from the 2s1/2 to the 1d3/2 orbitals play an important role in reproducing the 40S yrast level structure and the published B(E2;0+g.s.→2+1) value. The structure of the yrast states of the even-A isotopes of sulfur is interpreted in terms of the configurations of valence protons and neutrons within the context of large-scale 0ℏω sd−pf shell-model calculations.