Obesity is associated with multiple comorbidities such as cardiovascular diseases and has a huge economic impact on the health-care system. However, the treatment of obesity remains insufficient in terms of efficacy, tolerability, and safety. Here we created a nasal vaccine against obesity for the first time. To avoid the injectable administration-caused pain and skin-related adverse event, we focused on the intranasal route of antigen delivery. We developed a vaccine antigen (ghrelin-PspA (pneumococcal surface protein A)), which is a recombinant fusion protein incorporating ghrelin, a hormone that stimulates food intake and decreases energy expenditure, and PspA, a candidate of pneumococcal vaccine as a carrier protein. Ghrelin-PspA antigen was mixed with cyclic di-GMP adjuvant to enhance the immunogenicity and incorporated within a nanometer-sized hydrogel for the effective antigen delivery. Intranasal immunization with ghrelin-PspA vaccine elicited serum immunoglobulin G antibodies against ghrelin and attenuated body weight gain in diet-induced obesity mice. This obesity-attenuating effect was caused by a decrease in fat accumulation and an increase in energy expenditure that was partially due to an increase in the expression of mitochondrial uncoupling protein 1 in brown adipose tissue. The development of this nasal vaccine provides a new strategy for the prevention and treatment of obesity.