The need for multiple vaccinations to enhance the immunogenicity of subunit vaccines may be reduced by delivering the vaccine over an extended period of time. Here, we report two novel injectable pentablock copolymer based thermoresponsive hydrogels made of polyethyleneglycol-polycaprolactone-polylactide-polycaprolactone-polyethyleneglycol (PEG-PCL-PLA-PCL-PEG) with varying ratios of polycaprolactone (PCL) and polylactide (PLA), as single shot sustained release vaccines. Pentablock copolymer hydrogels were loaded with vaccine-encapsulated poly lactic-co-glycolic acid nanoparticles (PLGA-NP) or with the soluble vaccine components. Incorporation of PLGA-NP into the thermoresponsive hydrogels increased the complex viscosity of the gels, lowered the gelation temperature, and minimized the burst release of antigen and adjuvants. The two pentablock hydrogels stimulated both cellular and humoral responses. The addition of PLGA-NP to the hydrogels sustained immune responses for up to 49days. The polymer with a higher ratio of PCL to PLA formed a more rigid gel, induced stronger immune responses, and stimulated effective anti-tumor responses in a prophylactic melanoma tumor model.