Pyridine and pyrrole, which are regarded as recalcitrant chemicals, are released into the environment as a result of industrial manufacturing processes, posing serious hazards to both the environment and human health. However, the pyrrole degradation mechanism and the pyridine-degrading gene in Rhodococcus are unknown. Herein, a highly efficient pyridine and pyrrole degradation strain Rhodococcus ruber A5 was isolated. Strain A5 completely degraded 1000 mg/L pyridine in a mineral salt medium within 24 h. The pyridine degradation of strain A5 was optimized using the BoxBehnken design. The optimum degradation conditions were found to be pH 7.15, temperature 28.06 ℃, and inoculation amount 1290.94 mg/L. The pbd gene clusters involved in pyridine degradation were discovered via proteomic analysis. The initial ring cleavage of pyridine and pyrrole in strain A5 was carried out by the two-component flavin-dependent monooxygenase PbdA/PbdE. The degradation pathways of pyridine and pyrrole were proposed by the identification of metabolites and comparisons of homologous genes. Additionally, homologous pbd gene clusters were found to exist in different bacterial genomes. Our study revealed the ring cleavage mechanisms of pyrrole and pyridine, and strain A5 was identified as a promising resource for pyridine bioremediation.