Upstream open reading frames (uORFs) play important roles in regulating the main coding DNA sequences (CDSs) via translational repression. Despite their prevalence in the genomes, uORFs are overall discriminated against by natural selection. However, it remains unclear why in the genomes there are so many uORFs more conserved than expected under the assumption of neutral evolution. Here, we generated genome-wide maps of translational efficiency (TE) at the codon level throughout the life cycle of Drosophila melanogaster. We identified 35,735 uORFs that were expressed, and 32,224 (90.2%) of them showed evidence of ribosome occupancy during Drosophila development. The ribosome occupancy of uORFs is determined by genomic features, such as optimized sequence contexts around their start codons, a shorter distance to CDSs, and higher coding potentials. Our population genomic analysis suggests the segregating mutations that create or disrupt uORFs are overall deleterious in D. melanogaster. However, we found for the first time that many (68.3% of) newly fixed uORFs that are associated with ribosomes in D. melanogaster are driven by positive Darwinian selection. Our findings also suggest that uORFs play a vital role in controlling the translational program in Drosophila. Moreover, we found that many uORFs are transcribed or translated in a developmental stage-, sex-, or tissue-specific manner, suggesting that selective transcription or translation of uORFs could potentially modulate the TE of the downstream CDSs during Drosophila development.