In two-sided matching markets, not every worker-firm (doctor-hospital) pair can match with each other even if they would rather do so due to possible non-poaching contracts among firms or market specific regulations. Motivated by this observation, we introduce a new matching framework and a constrained stability notion, while emphasizing that the usual matching problem and Gale and Shapley, Am Math Mon 69:9–15 (1962)’s stability notion are realized as special cases of our formulation and the constrained stability notion. We first show that some fundamental properties of the stable matchings do not carry over to the constrained stable matchings. The worker-proposing deferred acceptance (DA) mechanism fails to be worker-optimal constrained stable, yet it is the unique constrained stable and strategy-proof mechanism. Lastly, we propose a worker-optimal constrained stable mechanism that also improves the workers’ welfare upon that under DA.