The U.S. Department of Justice announced that the Atlanta-based company would also "take steps" to block illicit online drug dealers from using their delivery service.
The DOJ said the fine amount is the money UPS (UPS) collected from suspect online pharmacies. UPS won't be charged with any crimes. Its biggest rival, FedEx Corp. (FDX), has also been a target of the federal investigation.
The investigation of the two companies stems from a global campaign to shutter illicit online pharmacies launched in 2005. Since then, dozens of arrests have been made and thousands of websites closed worldwide as investigators continue to broaden the probe beyond the operators.
Earlier this week, Chris Napoli, the operator of Safescripts Online, was sentenced to four years in prison and ordered to forfeit $24 million in revenue the illicit pharmacy took in between 2004 and 2006. Two other men were sentenced to prison along with Napoli.
Receipts from UPS and FedEx were used as evidence in the trio's trial last year.
Seven others have been convicted of operating illegal pharmacies in San Francisco federal court last year.
In 2011, Google Inc. (GOOG) agreed to pay $500 million to settle allegations by the Justice Department that it profited from ads for illegal online pharmacies.
UPS and FedEx each disclosed they were the target of a federal investigation in regulatory filings last year. UPS signaled at the time it was working on a resolution with the DOJ. FedEx, on the other hand, asserted no wrongdoing and said it wouldn't accept a plea bargain.