The endoplasmic reticulum (ER) is susceptible to wear-and-tear and proteotoxic stress, necessitating its turnover. Here, we show that the N-degron pathway mediates ER-phagy. This autophagic degradation initiates when the transmembrane E3 ligase TRIM13 (also known as RFP2) is ubiquitinated via the lysine 63 (K63) linkage. K63-ubiquitinated TRIM13 recruits p62 (also known as sequestosome-1), whose complex undergoes oligomerization. The oligomerization is induced when the ZZ domain of p62 is bound by the N-terminal arginine (Nt-Arg) of arginylated substrates. Upon activation by the Nt-Arg, oligomerized TRIM13-p62 complexes are separated along with the ER compartments and targeted to autophagosomes, leading to lysosomal degradation. When protein aggregates accumulate within the ER lumen, degradation-resistant autophagic cargoes are co-segregated by ER membranes for lysosomal degradation. We developed synthetic ligands to the p62 ZZ domain that enhance ER-phagy for ER protein quality control and alleviate ER stresses. Our results elucidate the biochemical mechanisms and pharmaceutical means that regulate ER homeostasis.