The paper deals with the issue of withdrawing from resuscitation in terminally ill patients. According to the Medical Code of Ethics, withholding of resuscitation efforts in terminally ill patients is permissible. It should be noted that the Polish legal system currently lacks clear regulations regarding the conditions under which resuscitation may be foregone. In practice, decision-making in such cases is typically guided by deontological norms and clinical practice. The article proposes de lege ferenda changes aimed at increasing the legal security of the physician.