
The detained person while throwing the eggs shouted "this country was built on the blood of slaves" while the crowd kept on booing "God Save the King".
The 23-year-old is a University of York student. He was restrained by police as crowds gathered at Micklegate Bar, the traditional royal entrance into the city, to greet the couple.
He was held on suspicion of a public order offense and remains in custody.
The incident occurred on the second day of an official royal visit to Yorkshire.
Charles and Camilla were in the northern city to unveil a statue of his late mother, Queen Elizabeth II.
As per The Washington Post, Charles didn't seem affected by the commotion, but he stepped around the eggs splattered on the pavement.
The role of Britain and the British royal family has come under repeated scrutiny in the countries where the British monarch is still head of state.
Earlier this year, during the Caribbean tour of Prince William and his wife, several activists called for the monarchy to apologize and support reparations for slavery.
Also, this was not the first incident when the newly appointed King faced protests. Just after days following the death of Queen Elizabeth, several arrests were made of the demonstrators staging protests.
While one was arrested in Edinburgh, Scotland for holding a sign with an expletive and the words "abolish the monarchy." Another woman was arrested for shouting "who elected him" while a document formally proclaiming Charles as king was being read aloud in Oxford, England.
Also, it was not the first time when eggs hit a British monarch. In 1986, during the queen's royal tour of New Zealand, she was also hit by an egg by a woman, who was protesting against Britain's treaty with the Maori tribes.