Numerous proteins initiate their folding, localization, and modifications early during translation, and emerging data show that the ribosome actively participates in diverse protein biogenesis pathways. Here we show that the ribosome imposes an additional layer of substrate selection during N-terminal methionine excision (NME), an essential protein modification in bacteria. Biochemical analyses show that cotranslational NME is exquisitely sensitive to a hydrophobic signal sequence or transmembrane domain near the N terminus of the nascent polypeptide. The ability of the nascent chain to access the active site of NME enzymes dictates NME efficiency, which is inhibited by confinement of the nascent chain on the ribosome surface and exacerbated by signal recognition particle. In vivo measurements corroborate the inhibition of NME by an N-terminal hydrophobic sequence, suggesting the retention of formylmethionine on a substantial fraction of the secretory and membrane proteome. Our work demonstrates how molecular features of a protein regulate its cotranslational modification and highlights the active participation of the ribosome in protein biogenesis pathways via interactions of the ribosome surface with the nascent protein.