Polymyxin B serves as the last line of defense in treating multidrug-resistant Gram-negative bacterial infections. However, its distinctive side effect of hyperpigmentation significantly impacts patients' psychological well-being and treatment adherence. Currently, the underlying mechanism of polymyxin B-induced pigmentation remains to be incompletely investigated. This study aims to explore the correlation between polymyxin B-induced pigmentation and autophagy in zebrafish and melanoma cells. Comparative analysis between polymyxin B and its analog polymyxin E reveals opposite effects of the two polymyxins on PMEL17 expression and autophagic flux. Polymyxin B increases PMEL17 expression, correlating with elevated LC3B-II/I level and inhibition of autolysosomal degradation activity, while polymyxin E exerts the contrary effects. RNA-seq analysis of autophagy genes identifies a significant upregulation of ATG2A expression induced by polymyxin B. Moreover, polymyxin B, dependent on ATG2A, promotes MITF overexpression through the LC3B-II/pERK/pCREB pathway, subsequently enhancing PMEL17 expression. This study elucidates the mechanism linking polymyxin B-induced pigmentation and autophagy, demonstrating that polymyxin B causes the accumulation of PMEL17 within autophagosomes and inhibits its autophagic degradation, suggesting that autophagosomes may transform into melanosomes. These findings further contribute to the theoretical basis for autophagy regulating melanin synthesis, highlighting the multifaceted functions of autophagic proteins beyond degradation within autolysosomes.