Being able to learn discriminative features from low-quality images has raised much attention recently due to their wide applications ranging from autonomous driving to safety surveillance. However, this task is difficult due to high variations across images, such as scale, rotation, illumination, and viewpoint, and distortions in images, such as blur, low contrast, and noise. Image preprocessing could improve the quality of the images, but it often requires human intervention and domain knowledge. Genetic programming (GP) with a flexible representation can automatically perform image preprocessing and feature extraction without human intervention. Therefore, this study proposes a new evolutionary learning approach using GP (EFLGP) to learn discriminative features from images with blur, low contrast, and noise for classification. In the proposed approach, we develop a new program structure (individual representation), a new function set, and a new terminal set. With these new designs, EFLGP can detect small regions from a large input low-quality image, select image operators to process the regions or detect features from the small regions, and output a flexible number of discriminative features. A set of commonly used image preprocessing operators is employed as functions in EFLGP to allow it to search for solutions that can effectively handle low-quality image data. The performance of EFLGP is comprehensively investigated on eight datasets of varying difficulty under the original (clean), blur, low contrast, and noise scenarios, and compared with a large number of benchmark methods using handcrafted features and deep features. The experimental results show that EFLGP achieves significantly better or similar results in most comparisons. The results also reveal that EFLGP is more invariant than the benchmark methods to blur, low contrast, and noise.