The present invention is based on the fact that imiquimod, which is a substance that enhances Toll-like receptor 7 (TLR7) related to the innate immunity of a living body, is effective in the prevention and treatment of obesity or liver disease, and the present invention relates to a pharmaceutical composition for the prevention and treatment of obesity or liver disease, wherein the TLR7 agonist used for the immune system disease inhibits fatty acid synthetase (FAS), activates autophagosome or inhibits IGF-1.