Maize yield is mostly determined by its grain size. Although numerous quantitative trait loci (QTL) have been identified for kernel-related traits, the application of these QTL in breeding programs has been strongly hindered because the populations used for QTL mapping are often different from breeding populations. However, the effect of genetic background on the efficiency of QTL and the accuracy of trait genomic prediction has not been fully studied. Here, we used a set of reciprocal introgression lines (ILs) derived from417F×517Fto evaluate how genetic background affects the detection of QTLassociated with kernel shape traits. A total of 51 QTL for kernel size were identified by chromosome segment lines (CSL) and genome-wide association studies (GWAS) methods. These were subsequently clustered into 13 common QTL based on their physical position, including 7 genetic-background-independent and 6 genetic-background-dependent QTL, respectively. Additionally, different digenic epistatic marker pairs were identified in the417Fand517FILs. Therefore, our results demonstrated that genetic background strongly affected not only the kernel size QTL mapping via CSL and GWAS but also the genomic prediction accuracy and epistatic detection, thereby enhancing our understanding of how genetic background affects the genetic dissection of grain size-related traits.