The deleterious effects of inbreeding are well documented and of major concern in conservation biology. Stressful environments have generally been shown to increase inbreeding depression; however, little is known about the underlying genetic mechanisms of the inbreeding-by-stress interaction and to what extent the fitness of individual deleterious mutations is altered under stress. Using microsatellite marker segregation data and quantitative trait locus (QTL) mapping methods, I performed a genome scan for deleterious mutations affecting viability (viability or vQTL) in two inbred families of the Pacific oyster Crassostrea gigas, reared in a stressful, nutrient-poor diet and a favourable, nutrient-rich diet, which had significant effects on growth and survival. Twice as many vQTL were detected in the stressful diet compared with the favourable diet, resulting primarily from substantially greater mortality of homozygous genotypes. At vQTL, estimates of selection (s) and dominance (h) were greater in the stressful environment ( = 0.86 vs. 0.54 and = 0.35 vs. 0.18, in stressful and nonstressful diets, respectively). There was no evidence of interaction between vQTL. Individual vQTL differed across diets in selection only, or in both selection and dominance, and some vQTL were not affected by diet. These results suggest that stress-associated increases in selection against individual deleterious alleles underlie greater inbreeding depression with stress. Furthermore, the finding that inbreeding-by-environment interaction appears, to some extent, to be locus specific, helps to explain previous observations of lineage-specific expression of inbreeding depression and environment-specific purging, which have important implications for conservation and evolutionary biology.