Obesity is often associated with increased pain, but little is known about the effects of obesity and diet on postoperative pain. In this study, effects of diet and obesity were examined in the paw incision model, a preclinical model of postoperative pain. Long-Evans rats were fed high-fat diet (40% calories from butter fat) or low-fat normal chow. Male rats fed high-fat diet starting 6 weeks before incision (a diet previously shown to induce markers of obesity) had prolonged mechanical hypersensitivity and an overall increase in spontaneous pain in response to paw incision, compared with normal chow controls. Diet effects in females were minor. Removing high-fat diet for 2 weeks before incision reversed the diet effects on pain behaviors, although this was not enough time to reverse high-fat diet-induced weight gain. A shorter (1 week) exposure to high-fat diet before incision also increased pain behaviors in males, albeit to a lesser degree. The 6-week high-fat diet increased macrophage density as examined immunohistochemically in lumbar dorsal root ganglion even before paw incision, especially in males, and sensitized responses of peritoneal macrophages to lipopolysaccharide stimuli in vitro. The nerve regeneration marker growth-associated protein 43 (GAP43) in skin near the incision (day 4) was higher in the high-fat diet group, and wound healing was delayed. In summary, high-fat diet increased postoperative pain particularly in males, but some diet effects did not depend on weight gain. Even short-term dietary manipulations, that do not affect obesity, may enhance postoperative pain.