Chromosome segment substitution (CSS) lines have the potential for use in QTL fine mapping and map-based cloning. The standard t-test used in the idealized case that each CSS line has a single segment from the donor parent is not suitable for non-idealized CSS lines carrying several substituted segments from the donor parent. In this study, we present a likelihood ratio test based on stepwise regression (RSTEP-LRT) that can be used for QTL mapping in a population consisting of non-idealized CSS lines. Stepwise regression is used to select the most important segments for the trait of interest, and the likelihood ratio test is used to calculate the LOD score of each chromosome segment. This method is statistically equivalent to the standard t-test with idealized CSS lines. To further improve the power of QTL mapping, a method is proposed to decrease multicollinearity among markers (or chromosome segments). QTL mapping with an example CSS population in rice consisting of 65 non-idealized CSS lines and 82 chromosome segments indicated that a total of 18 segments on eight of the 12 rice chromosomes harboured QTLs affecting grain length under the LOD threshold of 2.5. Three major stable QTLs were detected in all eight environments. Some minor QTLs were not detected in all environments, but they could increase or decrease the grain length constantly. These minor genes are also useful in marker-assisted gene pyramiding.