Viruses maximize their genetic coding capacity through a variety of biochemical mechanisms including programmed ribosomal frameshifting (PRF), which facilitates the production of multiple proteins from a single transcript. PRF is typically stimulated by structural elements within the mRNA that generate mechanical tension between the transcript and ribosome. However, in this work we show that the forces generated by the cotranslational folding of the nascent polypeptide chain can also enhance PRF. Using an array of biochemical, cellular, and computational techniques, we first demonstrate that the Sindbis virus structural polyprotein forms two competing topological isomers during biosynthesis at the ribosome-translocon complex. We then show that the formation of one of these topological isomers is linked to PRF. Coarse-grained molecular dynamic simulations reveal that the translocon-mediated membrane integration of a transmembrane domain upstream from the ribosomal slip-site generates a force on the nascent polypeptide chain that scales with observed frameshifting. Together, our results demonstrate that cotranslational folding of this protein generates a tension that stimulates PRF. To our knowledge, this constitutes the first example in which the conformational state of the nascent chain has been linked to PRF. These findings raise the possibility that, in addition to RNA-mediated translational recoding, a variety of cotranslational folding and/ or binding events may also stimulate PRF.