The immune system is essential in recognizing and eliminating tumor cells. The unique characteristics of the tumor microenvironment (TME), such as heterogeneity, reduced blood flow, hypoxia, and acidity, can reduce the efficacy of cell-mediated immunity. The primary goal of cancer immunotherapy is to modify the immune cells or the TME to enable the immune system to eliminate malignancies successfully. Nanobodies, known as single-domain antibodies, are light chain-free antibody fragments produced from Camelidae antibodies. The unique properties of nanobodies, including high stability, reduced immunogenicity, enhanced infiltration into the TME of solid tumors and facile genetic engineering have led to their promising application in cell-mediated immunotherapy. They can promote the cancer therapy either directly by bridging between tumor cells and immune cells and by targeting cancer cells using immune cell-bound nanobodies or indirectly by blocking the inhibitory ligands/receptors. The T-cell activation can be engaged through anti-CD3 and anti-4-1BB nanobodies in the bispecific (bispecific T-cell engagers (BiTEs)) and trispecific (trispecific T-cell engager (TriTEs)) manners. Also, nanobodies can be used as natural killer (NK) cell engagers (BiKEs, TriKEs, and TetraKEs) to create an immune synapse between the tumor and NK cells. Nanobodies can redirect immune cells to attack tumor cells through a chimeric antigen receptor (CAR) incorporating a nanobody against the target antigen. Various cancer antigens have been targeted by nanobody-based CAR-T and CAR-NK cells for treating both hematological and solid malignancies. They can also cause the continuation of immune surveillance against tumor cells by stopping inappropriate inhibition of immune checkpoints. Other roles of nanobodies in cell-mediated cancer immunotherapy include reprogramming macrophages to reduce metastasis and angiogenesis, as well as preventing the severe side effects occurring in cell-mediated immunotherapy. Here, we highlight the critical functions of various immune cells, including T cells, NK cells, and macrophages in the TME, and discuss newly developed immunotherapy methods based on the targeted manipulation of immune cells and TME with nanobodies.