Prevalence of type 2 diabetes (T2D) and obesity is increasing worldwide. Currently available therapies are not suited for all patients in the heterogeneous obese/T2D population, hence the need for novel treatments. Fibroblast growth factor 21 (FGF21) is considered a promising therapeutic agent for T2D/obesity. Native FGF21 has, however, poor pharmacokinetic properties, making gene therapy an attractive strategy to achieve sustained circulating levels of this protein. Here, adeno‐associated viral vectors (AAV) were used to genetically engineer liver, adipose tissue, or skeletal muscle to secrete FGF21. Treatment of animals under long‐term high‐fat diet feeding or of ob/ob mice resulted in marked reductions in body weight, adipose tissue hypertrophy and inflammation, hepatic steatosis, inflammation and fibrosis, and insulin resistance for > 1 year. This therapeutic effect was achieved in the absence of side effects despite continuously elevated serum FGF21. Furthermore, FGF21 overproduction in healthy animals fed a standard diet prevented the increase in weight and insulin resistance associated with aging. Our study underscores the potential of FGF21 gene therapy to treat obesity, insulin resistance, and T2D.