Conclusion: A single sub-anesthetic dose (0.3 mg kg−1) of ketamine can significantly improve the postoperative anxiety and depression of colorectal cancer patients and reduce the levels of IL-6, IL-8, and TNF-α. The gene discussed is CXCL8; the disease is depressive disorder.