The vaccine prompts the body to produce antibodies against ghrelin, a hormone that stimulates hunger and weight gain.
Vaccinated rats put on less weight while eating the same amount as those which did not have the jab.
A UK obesity expert said the Proceedings of the National Academy of Sciences study was interesting, but it might not be safe for people.
Researchers at the Scripps Research Institute in California developed three synthetic vaccines that recognise different parts of the ghrelin hormone.
When injected into rats, two of the vaccines were found to bind to the active form of ghrelin, inducing antibodies against the hormone and blocking its action.
This is an important proof of principle, but they need to have more control of the anti-bodies that are produced. Ghrelin is present in the brain, so there is a risk of an immune system response against the brain.
The researcher will need to make it safer before using it on humans.