Although detailed pictures of ribosome structures are emerging, little is known about the structural and cotranslational folding properties of nascent polypeptide chains at the atomic level. Here we used solution-state NMR spectroscopy to define a structural ensemble of a ribosome-nascent chain complex (RNC) formed during protein biosynthesis in Escherichia coli, in which a pair of immunoglobulin-like domains adopts a folded N-terminal domain (FLN5) and a disordered but compact C-terminal domain (FLN6). To study how FLN5 acquires its native structure cotranslationally, we progressively shortened the RNC constructs. We found that the ribosome modulates the folding process, because the complete sequence of FLN5 emerged well beyond the tunnel before acquiring native structure, whereas FLN5 in isolation folded spontaneously, even when truncated. This finding suggests that regulating structure acquisition during biosynthesis can reduce the probability of misfolding, particularly of homologous domains.