We introduce a Morse theory for posets of Bestvina–Brady type combining matchings and height functions. This theory generalizes Forman's discrete Morse theory for regular CW-complexes and extends previous results on Morse theory for $h$-regular posets to all finite posets. We also develop a relative version of Morse theory which allows us to compare the topology of a poset with that of a given subposet.