Melatonin plays an important role in regulating circadian rhythms. It also acts as a potent antioxidant and regulates glucose and lipid metabolism, although the exact action mechanism is not clear. The α2-HS-glycoprotein gene (AHSG) and its protein, fetuin-A (FETUA), are one of the hepatokines and are known to be associated with insulin resistance and type 2 diabetes. The aim of this study was to determine whether melatonin improves hepatic insulin resistance and hepatic steatosis in a FETUA-dependent manner. In HepG2 cells treated with 300 μmol/L of palmitic acid, phosphorylated AKT expression decreased, and FETUA expression increased, but this effect was inhibited by treatment with 10 μmol/L of melatonin. However, melatonin did not improve insulin resistance in FETUA-overexpressing cells, indicating that improvement in insulin resistance by melatonin was dependent on downregulation of FETUA. Moreover, melatonin decreased palmitic acid-induced ER stress markers, CHOP, Bip, ATF-6, XBP-1, ATF-4, and PERK. In addition, in the high-fat diet (HFD) mice, oral treatment with 100 mg/kg/day melatonin for 10 weeks reduced body weight gain to one-third of that of the HFD group and hepatic steatosis. Insulin sensitivity and glucose intolerance improved with the upregulation of muscle p-AKT protein expression. FETUA expression and ER stress markers in the liver and serum of HFD mice were decreased by melatonin treatment. In conclusion, melatonin can improve hepatic insulin resistance and hepatic steatosis through reduction in ER stress and the resultant AHSG expression.