Both propofol and midazolam are known to inhibit immune function. The aim of this study was to investigate cytokine production in critically ill surgical patients as early markers of immune response to prolonged infusion of propofol and midazolam. The study enrolled 40 elective patients who were to receive long-term sedation for more than 2 days. Patients were randomly allocated to one of two equally sized groups. Central venous blood samples for measurement of interleukin-1β (IL-1β), interleukin-2 (IL-2), interleukin-6 (IL-6), interleukin-8 (IL-8), tumour necrosis factor-α (TNF-α) and interferon-γ (IFN-γ) were drawn prior to the start and after 48 h of infusion. After 48 h, propofol caused significant increases in IL-1β (24%), IL-6 (23%) and TNF-α (4.8 times) levels, while midazolam caused significant decreases in IL-1β (21%), IL-6 (21%) and TNF-α (19%). Both agents caused significant decreases in IL-8 levels (propofol: 30%, midazolam: 48%, p < 0.05). Propofol caused significant decreases in IL-2 levels (68%, p < 0.001) but increases in IFN-γ (30%, p < 0.05), whereas there was no significant change with midazolam compared with the pre-infusion level. In conclusion, during 48 h of continuous infusion, propofol stimulated, while midazolam suppressed, the production of the pro-inflammatory cytokines IL-1β, IL-6 and TNF-α, and both caused suppression of IL-8 production. Propofol inhibited IL-2 production and stimulated IFN-γ production, whereas midazolam failed to do so. Therefore, sedative agents may have clinical implications in high-risk and immunocompromised patients.