The sulfonylation of quinazolin-4(3H)-ones and related tetrahydrobenzothieno[2,3-d]pyrimidin-4(3H)-ones with mesyl, tosyl, and p-cyanobenzenesulfonyl chloride was studied. A hydrogen substituent at 2-position directed the sulfonyl group to the N-3 position, while alkylsulfanyl or amino substituents led to sulfonylation of the carbonyl oxygen. The latter effect was attributed to steric influence and the positive mesomeric effect of the 2-substituent. An access to N-sulfonylated 2-substituted regioisomers was established. An unexpected 1,3-sulfonyl migration was observed and further analyzed. This process occurred as an intramolecular N- to O-shift as verified by kinetic and crossover experiments.