A spellcaster currently concentrating on haste on themselves sees a situation unfolding that desperately requires them to concentrate on another spell, for example, hypnotic pattern.
They move and take their action to start casting the new spell. However, concentration on a spell begins once you start casting it, which would immediately end haste, causing lethargy that makes the spellcaster unable to move or take actions until after their next turn.
The spellcaster has already finished moving, and has already chosen an action to take (casting a new concentration spell), and has actually started taking that action.
Does haste's lethargy effect interrupt the casting of the new spell, or does the new spell go off and then the caster becomes lethargic immediately afterwards?