A temporary evacuation resulted from the finding in the West Wing, which houses the Oval Office and other workspaces for presidential advisers and personnel.
During a regular examination, Secret Service personnel discovered the strange substance in a location open to tour groups.
At the time, Camp David in Maryland was where President Joe Biden and his family stayed.
The drug was discovered in a storage facility that White House personnel and visitors frequently use to store their mobile phones, a senior law enforcement official told the BBC’s American partner CBS News.
After it was found, the White House compound was shut down out of an abundance of caution at 20:45 local time (00:45 GMT) on Sunday.
A preliminary test later confirmed that it was cocaine, as first reported by the Washington Post.
Officials informed CBS that the Secret Service would oversee a thorough investigation into how the drug entered the White House.
To find out who had access to the location where it was found, they stated that cameras and entrance logs would be inspected.
According to the US Narcotic Enforcement Administration, cocaine is classified as a Schedule II narcotic under the Controlled Substances Act, which indicates that it has a significant potential for abuse.
The Oval Office and the Situation Room are located in the West Wing, a sizable, multi-level area of the White House that houses the President of the United States offices.
Where’s Hunter? White House Evacuated After Cocaine Found https://t.co/5TUslnGrD2
— 🇺🇸ProudArmyBrat (@leslibless) July 3, 2023
Along with hundreds of other employees who have access, it also houses the offices of the vice president, the White House chief of staff, the press secretary, and others.