Nonalcoholic fatty liver (NAFL) is a common liver disease, associated with insulin resistance. Betaine has been tested as a treatment for NAFL in animal models and in small clinical trials, with mixed results. The present study aims to determine whether betaine treatment would prevent or treat NAFL in mice and to understand how betaine reverses hepatic insulin resistance. Male mice were fed a moderate high-fat diet (mHF) containing 20% of calories from fat for 7 (mHF) or 8 (mHF8) mo without betaine, with betaine (mHFB), or with betaine for the last 6 wk (mHF8B). Control mice were fed standard chow containing 9% of calories from fat for 7 mo (SF) or 8 mo (SF8). HepG2 cells were made insulin resistant and then studied with or without betaine. mHF mice had higher body weight, fasting glucose, insulin, and triglycerides and greater hepatic fat than SF mice. Betaine reduced fasting glucose, insulin, triglycerides, and hepatic fat. In the mHF8B group, betaine treatment significantly improved insulin resistance and hepatic steatosis. Hepatic betaine content significantly decreased in mHF and increased significantly in mHFB. Betaine treatment reversed the inhibition of hepatic insulin signaling in mHF and in insulin-resistant HepG2 cells, including normalization of insulin receptor substrate 1 (IRS1) phosphorylation and of downstream signaling pathways for gluconeogenesis and glycogen synthesis. Betaine treatment prevents and treats fatty liver in a moderate high-dietary-fat model of NAFL in mice. Betaine also reverses hepatic insulin resistance in part by increasing the activation of IRS1, with resultant improvement in downstream signaling pathways.