Ansamitocin P-3 (AP-3) exhibits potent biological activities against various tumor cells. As an important drug precursor, reliable supply of AP-3 is limited by low fermentation yield. Although different strategies have been implemented to improve AP-3 yield, few have investigated the impact of efflux on AP-3 production. In this study, AP-3 efflux genes were identified through combined analysis of two sets of transcriptomes. The production-based transcriptome was implemented to search for efflux genes highly expressed in response to AP-3 accumulation during the fermentation process, while the resistance-based transcriptome was designed to screen for genes actively expressed in response to the exogenous supplementation of AP-3. After comprehensive analysis of two transcriptomes, six efflux genes outside the ansamitocin BGC were identified. Among the six genes, individual deletion of APASM_2704, APASM_6861, APASM_3193, and APASM_2805 resulted in decreased AP-3 production, and alternative overexpression led to AP-3 yield increase from 264.6 to 302.4, 320.4, 330.6, and 320.6 mg/L, respectively. Surprisingly, APASM_2704 was found to be responsible for exportation of AP-3 and another macro-lactam antibiotic pretilactam. Furthermore, growth of APASM_2704, APASM_3193, or APASM_2805 overexpression mutants was obviously improved under 300 mg/L AP-3 supplementation. In summary, our study has identified AP-3 efflux genes outside the ansamitocin BGC by comparative transcriptomic analysis, and has shown that enhancing the transcription of transporter genes can improve AP-3 production, shedding light on strategies used for exporter screening and antibiotic production improvement. KEY POINTS: • AP-3-related efflux genes were identified by transcriptomic analysis. • Deletion of the identified efflux genes led in AP-3 yield decrease. • Overexpression of the efflux genes resulted in increased AP-3 production.