The 23-year-old was held on suspicion of a public order offence and is in custody for questioning, North Yorkshire Police said.
As the eggs landed, a suited protection officer positioned himself next to the King and briefly held his shoulder.
People in the crowd booed and shouted “God save the King” and “shame on you”.
The protester was heard to shout “this country was built on the blood of slaves” as he was detained.
The King nearly stepped in one of the eggs but appeared unruffled and continued walking.
The incident occurred on the second day of an official royal visit to Yorkshire, during which the King and Queen Consort later travelled to Doncaster.
The royal couple were being welcomed by city leaders in York when several eggs were thrown at them as the protester booed the pair.
Charles continued shaking hands with dignitaries including the Lord Mayor as the eggs flew in his direction, pausing briefly to look at the cracked shells on the ground.
The eggs missed the King and Queen Consort and they were ushered away.
Several officers were seen restraining a man on the ground behind temporary fencing set up for the King’s visit.
Witness Kim Oldfield, owner of the Blossom Street Gallery, said she was standing in the doorway of her shop “enjoying” the couple’s arrival when she heard “some booing and eggs flying”.
“I glanced across, [saw] the police just descended on the barrier and tried to drag this chap over the top.
“About five eggs he’d managed to send.
“Camilla sort of flinched a little bit when the booing started but they [police] quelled it really quickly. Just a shame they spoilt what was a lovely moment.”