The use of terminal sedation to control the intense discomfort of dying patients appears both to be an established practice in palliative care and to run counter to the moral and legal norm that forbids health care professionals from intentionally killing patients. This raises the worry that the requirements of established palliative care are incompatible with moral and legal opposition to euthanasia. This paper explains how the doctrine of double effect can be relied on to distinguish terminal sedation from euthanasia. The doctrine of double effect is rooted in Catholic moral casuistry, but its application in law and morality need not depend on the particular framework in which it was developed. The paper further explains how the moral weight of the distinction between intended harms and merely foreseen harms in the doctrine of double effect can be justified by appeal to a limitation on the human capacity to pursue good.