Secreted and membrane proteins are translocated across or into cell membranes through a protein-conducting channel (PCC). Here we present a cryo-electron microscopy reconstruction of the Escherichia coli PCC, SecYEG, complexed with the ribosome and a nascent chain containing a signal anchor. This reconstruction shows a messenger RNA, three transfer RNAs, the nascent chain, and detailed features of both a translocating PCC and a second, non-translocating PCC bound to mRNA hairpins. The translocating PCC forms connections with ribosomal RNA hairpins on two sides and ribosomal proteins at the back, leaving a frontal opening. Normal mode-based flexible fitting of the archaeal SecYEβ structure into the PCC electron microscopy densities favours a front-to-front arrangement of two SecYEG complexes in the PCC, and supports channel formation by the opening of two linked SecY halves during polypeptide translocation. On the basis of our observation in the translocating PCC of two segregated pores with different degrees of access to bulk lipid, we propose a model for co-translational protein translocation.