Peptide vaccine targeting tumor-specific antigens is a promising cancer treatment regimen. However, peptide vaccines are commonly low-immunogenic, leading to suboptimal antitumor T-cell responses. Current peptide vaccination approaches are challenged by the variability of peptide physicochemical characters and vaccine formulations, flexibility, and the broad feasibility. Here, the supramolecular co-assembly of antigen epitope-conjugated peptides (ECPs) targeting CD8 or CD4 T-cell receptors was used to engineer a nanofibrious hydrogel vaccine platform. This approach provided precise and tunable loading of peptide antigens in nanofibers, which notably increased the antigen uptake, cross-presentation, and activation of dendritic cells (DCs). Immunization in mice indicated that the co-assembled peptide hydrogel did not induce local inflammation responses and elicited significantly promoted T-cell immunity by activating the MyD88-dependent NF-κB signaling pathway in DCs. Vaccination of mice using co-assembled peptide vaccine stimulated both enhanced CD8 and CD4 T cells against EG.7-OVA tumors without additional immunoadjuvants or delivery systems, and resulted in a more remarkable cancer immunotherapy efficacy, compared with free peptide vaccine or aluminum-adjuvanted peptide formulation. Altogether, peptide co-assembly demonstrated by three independent pairs of ECPs is a facile, customizable, and chemically defined approach for co-delivering peptide antigens in self-adjuvanting hydrogel vaccines that could induce stronger anticancer T-cell responses.