In a joint statement, the gallery and the trust said they had "jointly agreed not to proceed at this time" with the grant, which the gallery was originally promised in 2016 as part of a £35.5m project for building development.
Last month, the US photographer Nan Goldin told The Observer newspaper that she would refuse permission for a retrospective of her work to be held at the National Portrait Gallery if it accepted the donation.
Goldin began a campaign against the Sackler family and its charitable trust after she was prescribed and became addicted to Oxycontin, an opioid produced by the US-based company Purdue Pharma, which is wholly owned by the family.
Purdue Pharma is currently being sued in the US by the Massachusetts Attorney General’s Office, which alleged in court documents that the company had created an addiction epidemic and "profited from it through a web of illegal deceit" by misleading doctors and patients to encourage more people to take higher doses of the drug for longer than was safe.
The Sackler family deny the allegations.
Since 2009, according to the court documents, 671 people who were given prescriptions for Purdue drugs have died of opioid-related overdoses, which the documents describe as a "massacre for patients" and a "gold mine" for the company.
In the joint statement issued today, the Sackler Trust said the Sackler family’s giving philosophy had "always been to actively support institutions while never getting in the way of their mission".
The statement said: "It has become evident that recent reporting of allegations made against Sackler family members may cause this new donation to deflect the National Portrait Gallery from its important work.
"The allegations against family members are vigorously denied, but to avoid being a distraction for the NPG, we have decided not to proceed at this time with the donation. We continue to believe strongly in the gallery and the wonderful work it does."
The Sackler Trust has supported a range of arts organisations in the UK in the past, providing funding for the Sackler Centre for arts education at the V&A, and the Sackler Gallery at London’s Serpentine Galleries.
David Ross, chair of the National Portrait Gallery, said: "I acknowledge the generosity of the Sackler family and their support of the arts over the years. We understand and support their decision not to proceed at this time with the donation to the gallery."