Mylan NV swung to a quarterly loss as it booked a charge related to a settlement with U.S. authorities on pricing of its EpiPen. Revenue growth was below expectations as volumes of the lifesaving auto-injector fell.

The quarter’s results gave the first indication of the impact of the EpiPen pricing controversy, which triggered a congressional hearing and the $465 million settlement to resolve allegations that Medicaid overpaid Mylan.

The...