The genetic basis of quantitative traits such as body weight and obesity is complex, with several hundred quantitative trait loci (QTLs) known to affect these and related traits in humans and mice. It also has become increasingly evident that the single-locus effects of these QTLs vary considerably depending on factors such as the sex of the individuals and their dietary environment, and we were interested to know whether this context-dependency also applies to two-locus epistatic effects of QTLs as well. We therefore conducted a genome scan to search for epistatic effects on 13 different weight and adiposity traits in an F2 population of mice (created from an original intercross of the FVB strain with M16i, a polygenic obesity model) that were fed either a control or a high-fat diet and half of which harbored a transgene (PyMT) that caused the development of metastatic mammary cancer. We used a conventional interval mapping approach with SNPs to scan all 19 autosomes, and found extensive epistasis affecting all of these traits. More importantly, we also discovered that the majority of these epistatic effects exhibited significant interactions with sex, diet, and/or presence of PyMT. Analysis of these interactions showed that many of them appeared to involve QTLs previously identified as affecting these traits, but whose single-locus effects were variously modified by two-locus epistatic effects of other QTLs depending on the sex, diet, or PyMT environment. It was concluded that this context-dependency of epistatic effects is an important component of the genetic architecture of complex traits such as those contributing to weight and obesity