Conditions during incubation and rearing can greatly affect the developmental trajectory of chickens, in a positive and negative way. In this study, the effect of early-life conditions on the visual discrimination abilities of adult, free-ranging laying hens was examined. These early-life treatments entailed incubation in a 12/12h green light/dark cycle and rearing with Black soldier fly larvae (BSFL) as foraging enrichment. Through a modified pebble-floor test, 171 hens of 41 to 42 wk old, housed in mobile stables with outdoor access, were tested for their ability to discriminate between food and nonfood items (mealworms and decoy mealworms). Each hen was allowed 60 pecks during the trial, from which the overall success rate, as well as within-trial learning was investigated. The latter was accomplished by dividing the 60 pecks into 3 blocks of 20 pecks and comparing the success rate between these blocks. Due to another ongoing experiment on range use, roughly half the hens received range enrichment (mealworms) at the time of testing, so this was included as a covariate in the analysis. Incubation with green light did not have an effect on the visual discrimination abilities of adult laying hens. Rearing with BSFL did have a limited beneficial effect on the visual discrimination abilities, as evidenced by a higher success rate during the first block of the visual discrimination trial. These enhanced visual discrimination abilities might be useful in a more complex free-range setting, where the animals have more foraging opportunities. Hens that received range enrichment at the time of testing, also had a higher success rate during the visual discrimination test, though they had a lower degree of test completion, likely due to habituation to the mealworms as an enrichment. The positive effects of BSFL during rearing and mealworms during the laying period stress the importance of enrichment throughout the life of the hens.