The French cosmetics giant last week selected her to be the first woman in a hijab for a mainstream shampoo campaign.
Khan's messages, posted on Twitter in 2014, have since been deleted.
"I deeply regret the content of the tweets I made in 2014, and sincerely apologise for the upset and hurt that they have caused," she said on Twitter on Monday.
"With deep regret, I've decided to step down from this campaign because the current conversations surrounding it detract from the positive and inclusive sentiment that it set out to deliver."
L'Oreal group, contacted by AFP, said it "approved" her decision.
It is not the first time a L'Oreal advertising campaign to promote diversity has foundered because of controversial social media comments by a model.
Last summer the group dropped British black transgender model Munroe Bergdorf over Facebook comments she made accusing all whites of racial violence.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.