Foreign antigen recognition is the ability of immune cells to distinguish self from nonself, which is crucial for immune responses in both invertebrates and vertebrates. In vertebrates, T cells play a pivotal role in graft rejection by recognizing alloantigens presented by antigen-presenting cells through direct, indirect, or semidirect pathways. B cells also significantly contribute to the indirect presentation of antigens to T cells. Innate immune cells, such as dendritic cells, identify pathogen- or danger-associated molecular patterns through pattern recognition receptors, thereby facilitating effective antigen presentation to T cells. Recent studies have shown that innate immune cells, including macrophages and NK cells, can recognize allogeneic or xenogeneic antigens using immune receptors like CD47 or activating NK receptors, instead of pattern recognition receptors. Additionally, macrophages and NK cells are capable of exhibiting memory responses to alloantigens, although these responses are shorter than those of adaptive memory. T cells also recognize xenoantigens through either direct or indirect presentation. Notably, macrophages and NK cells can directly recognize xenoantigens via surface immune receptors in an antibody-independent manner, or they can be activated in an antibody-dependent manner. Advances in our understanding of the recognition mechanisms of adaptive and innate immunity against allogeneic and xenogeneic antigens may improve our understanding of graft rejection.