The late Queen's lady-in-waiting Lady Susan Hussey has apologised and resigned after she repeatedly asked a black British charity boss where she was really from.
Ngozi Fulani, a charity founder, was questioned about her background at the charity event at the palace on Tuesday.
Ms Fulani, said she was "totally stunned" by Prince William's godmother's comments.
The palace described the remarks as "unacceptable and deeply regrettable".
A spokesperson for Prince William said "racism has no place in our society".
"The comments were unacceptable, and it is right that the individual has stepped aside with immediate effect," they said.
An eyewitness to the conversation, Mandu Reid, told BBC News that Lady Hussey's questions had been "offensive, racist and unwelcoming".
The leader of the Women's Equality Party said she had felt a "sense of incredulity" about the exchange in which Ms Fulani was interrogated about where she was from, even though she had already explained she was born and lived in the UK.
In its statement, Buckingham Palace said: "We take this incident extremely seriously and have investigated immediately to establish the full details.
"In this instance, unacceptable and deeply regrettable comments have been made. We have reached out to Ngozi Fulani on this matter, and are inviting her to discuss all elements of her experience in person if she wishes.
"In the meantime, the individual concerned would like to express her profound apologies for the hurt caused and has stepped aside from her honorary role with immediate effect.
"All members of the household are being reminded of the diversity and inclusivity policies which they are required to uphold at all times."
Lady Hussey, 83, was a close confidante of the late Queen and accompanied her at the funeral of the Duke of Edinburgh last year.
Ms Fulani was at the reception at Buckingham Palace on Tuesday representing the London-based charity Sistah Space, which supports women of African and Caribbean heritage across the UK who have faced domestic and sexual abuse.
Along with 300 guests, she had been invited to the event, where the Queen Consort, Camilla, had warned of a "global pandemic of violence against women".
But afterwards, Ms Fulani described on Twitter how the royal aide moved her hair aside to see her name badge, and then challenged her to explain where she was from.
In the post, Ms Fulani referred to the palace aide only as "Lady SH".
But Ms Reid confirmed to BBC News the person who had made the remarks was Lady Susan Hussey, having seen her name badge. Neither Buckingham Palace nor the charity named her.
BBC News has approached Lady Hussey for comment through Buckingham Palace.
Here is the full conversation, as recounted by Ms Fulani:
Lady SH: Where are you from?
Me: Sistah Space.
SH: No, where do you come from?
Me: We're based in Hackney.
SH: No, what part of Africa are you from?
Me: I don't know, they didn't leave any records.
SH: Well, you must know where you're from, I spent time in France. Where are you from?
Me: Here, the UK.
SH: No, but what nationality are you?
Me: I am born here and am British.
SH: No, but where do you really come from, where do your people come from?
Me: 'My people', lady, what is this?
SH: Oh I can see I am going to have a challenge getting you to say where you're from. When did you first come here?
Me: Lady! I am a British national, my parents came here in the 50s when...
SH: Oh, I knew we'd get there in the end, you're Caribbean!
Me: No, lady, I am of African Caribbean descent and British nationality.
SH: Oh so you're from...
Lady Susan Hussey quits over remarks to charity boss Ngozi Fulani - BBC
Read More