Nuclear mRNA export is a crucial step in eukaryotic gene expression, which is in yeast coupled to cotranscriptional messenger ribonucleoprotein particle ( mRNP) assembly and surveillance. Several surveillance systems that monitor nuclear mRNP biogenesis and export have been described, but the mechanism by which the improper mRNPs are recognized and eliminated remains poorly understood. Here we report that the conserved PIN domain protein Swt1 is an RNA endonuclease that participates in quality control of nuclear mRNPs and can associate with the nuclear pore complex (NPC). Swt1 showed endoribonuclease activity in vitro that was inhibited by a point mutation in the predicted catalytic site. Swt1 lacked clear sequence specificity but showed a strong preference for single-stranded regions. Genetic interactions were found between Swt1 and the THO/TREX and TREX-2 complexes, and with components of the perinuclear mRNP surveillance system, Mlp1, Nup60, and Esc1. Inhibition of the nuclease activity of Swt1 increased the levels and cytoplasmic leakage of unspliced aberrant pre-mRNA, and induced robust nuclear poly(A)(+) RNA accumulation in mlp1 Delta and esc1 Delta strains. Overexpression of Swt1 also caused strong nuclear poly(A)(+) RNA accumulation. Swt1 is normally distributed throughout the nucleus and cytoplasm but becomes concentrated at nuclear pore complexes (NPCs) in the nup133 Delta mutant, which causes NPC clustering and defects in mRNP export. The data suggest that Swt1 endoribonuclease might be transiently recruited to NPCs to initiate the degradation of defective pre-mRNPs or mRNPs trapped at nuclear periphery in order to avoid their cytoplasmic export and translation.