Hamp tendered her resignation Tuesday through her attorneys, according to Toyota Motor Corp. It said the company accepted it because of "the concerns and inconvenience that recent events have caused our stakeholders."
Hamp, a 55-year-old American who was Toyota's newly appointed head of public relations, was arrested on June 18 on suspicion of importing oxycodone, a narcotic pain killer, into Japan. The drug is tightly controlled in the country.
Toyota declined to disclose other details, noting the investigation was ongoing.
Hamp, who previously worked for Toyota's U.S. operations, remains in custody and has not been available for comment.
Her appointment in April had been highlighted by Toyota as a step toward promoting diversity.
Toyota reiterated Wednesday that it remains committed to diversity, but acknowledged it still needs to become "a truly global company."
Toyota President Akio Toyoda has said the company should have helped Hamp more in settling into her job in Japan. He also has said he believes Hamp did not intend to break the law.
Her arrest came as she was moving her things from the U.S., and the police came to her Tokyo hotel after finding the drug in a package that was mailed to her. Japanese media said the drugs were hidden in a package containing jewelry.
Although Japanese Toyota officials have been posted abroad, Hamp was the first senior foreign Toyota executive to be fully stationed in Japan.
Foreigners have sometimes been detained in Japan for mailing or bringing in medicines they used at home. Such drugs may be banned in Japan or require special approval.
Before joining Toyota in 2012, Hamp worked for PepsiCo Inc. and General Motors Co.
Follow Yuri Kageyama on Twitter at twitter.com/yurikageyamaSuggest a correction