An Arizona man has pleaded guilty to trafficking thousands of pills containing carfentanil into Birmingham.