Peroxisomes are ubiquitous organelles that house various metabolic reactions and are essential for human health. Luminal peroxisomal proteins are imported from the cytosol by mobile receptors, which then recycle back to the cytosol by a poorly understood process. Recycling requires receptor modification by a membrane-embedded ubiquitin ligase complex comprised of three RING finger (RF) domain-containing proteins (Pex2, Pex10, and Pex12). Here, we report a cryo-electron microscopy (cryo-EM) structure of the ligase complex, which together with biochemical and in vivo experiments reveals its function as a retro-translocon for peroxisomal import receptors. Each subunit of the complex contributes five transmembrane segments that co-assemble into an open channel. The three RFs form a cytosolic tower, with RF2 positioned above the channel pore. We propose that the N-terminus of a recycling receptor is inserted from the peroxisomal lumen into the pore and modified by RF2 to enable extraction into the cytosol. If recycling is compromised, receptors are polyubiquitinated by the concerted action of RF10 and RF12 and degraded. This polyubiquitination pathway also maintains the homeostasis of other peroxisomal import factors. Our results clarify a crucial step during peroxisomal protein import and reveal why mutations in the ligase complex cause human disease.