We study relations between the Cohen-Macaulay property and the positivity of $h$-vectors, showing that these two conditions are equivalent for those locally Cohen-Macaulay equidimensional closed projective subschemes $X$, which are close to a complete intersection $Y$ (of the same codimension) in terms of the difference between the degrees. More precisely, let $X\subset \mathbb P^n_K$ ($n\geq 4$) be contained in $Y$, either of codimension two with $deg(Y)-deg(X)\leq 5$ or of codimension $\geq 3$ with $deg(Y)-deg(X)\leq 3$. Over a field $K$ of characteristic 0, we prove that $X$ is arithmetically Cohen-Macaulay if and only if its $h$-vector is positive, improving results of a previous work. We show that this equivalence holds also for space curves $C$ with $deg(Y)-deg(C)\leq 5$ in every characteristic $ch(K)\neq 2$. Moreover, we find other classes of subschemes for which the positivity of the $h$-vector implies the Cohen-Macaulay property and provide several examples.