Peroxisomes are dynamic multipurpose organelles with a major function in fatty acid oxidation and breakdown of hydrogen peroxide. Many proteins destined for the peroxisomal matrix contain a C-terminal peroxisomal targeting signal type 1 (PTS1), which is recognized by tetratricopeptide repeat (TPR) proteins of the Pex5 family. Various species express at least two different Pex5 proteins, but how this contributes to protein import and organelle function is not fully understood. Here, we analyzed truncated and chimeric variants of two Pex5 proteins, Pex5a and Pex5b, from the fungus Ustilago maydis. Both proteins are required for optimal growth on oleic acid-containing medium. The N-terminal domain (NTD) of Pex5b is critical for import of all investigated peroxisomal matrix proteins including PTS2 proteins and at least one protein without a canonical PTS. In contrast, the NTD of Pex5a is not sufficient for translocation of peroxisomal matrix proteins. In the presence of Pex5b, however, specific cargo can be imported via this domain of Pex5a. The TPR domains of Pex5a and Pex5b differ in their affinity to variations of the PTS1 motif and thus can mediate import of different subsets of matrix proteins. Together, our data reveal that U. maydis employs versatile targeting modules to control peroxisome function. These findings will promote our understanding of peroxisomal protein import also in other biological systems.