Charles and Camilla shockedviewers on Thursday evening with a surprise appearance during a street party at Albert Square.
During her appearance, Camilla tied a ribbon for "all the victims of domestic abuse".
The surprise visit came after Mick Carter, played by Danny Dyer, decided to throw a street party for the Square in celebration of the British Queen's 70-year reign.
The partygoers are left in disbelief when the royal couple pull up in a car outside the Queen Vic pub, greeted by Mick and Linda Carter, played by Kellie Bright.
Fans were shocked to see the pair on their TV screens while watching the much-loved soap.
During the episode, Camilla is introduced to Karen Taylor, played by Lorraine Stanley, whose on-screen daughter Chantelle Atkins, played by Jessica Plummer, was murdered in a domestic abuse storyline.
Camilla took a purple ribbon and tied it around a tree in memory of Chantelle, who suffered months of abuse at the hands of her husband Gray Atkins in the soap.
She said: "This is for your daughter, Chantelle. This is for all victims of domestic abuse."
icon Sharon Watts, played by Letitia Dean, said it was a "proper royal seal of approval".
In the episode, Charles unveiled a plaque commemorating the visit to Albert Square.
Danny Dyer said: "We'd like to mark this very special occasion with a memento. We've all had a whip around and there is a collection for you behind the bar in your great-great-great-grandmothers boozer to go to a charity that is close to your heart."
While meeting the residents of Walford, Charles is introduced to greengrocer Martin Fowler, played by James Bye, who explains the history of his market stall dating back generations in his family who have lived on the Square.
Charles said: "That's the wonderful thing about London, all the different markets and stalls where people inherit them over the generations."
Take a look behind the Scenes as Albert Square celebrates the Queen’s Platinum Jubilee, on the day The Prince of Wales and The Duchess of Cornwall made a very special visit to EastEnders meeting both our cast and crew. #EastEnders pic.twitter.com/51TVlK4rjB— BBC EastEnders (@bbceastenders) June 2, 2022
Camilla shook hands with fan favourite Shrimpy, played by Ben Champniss, and "speechless" Harvey Monroe played by Ross Boatman.
She was also introduced to "legend of the square" Patrick Trueman, played by Rudolph Walker, and points out the "nice little bottle" of rum from Trinidad that Patrick is holding.
In unison, they say: "A drop a day keeps the doctor away," causing the residents to laugh along with them.
Patrick then asks Camilla if he can interest her in a tot of rum before she leaves, to which she agrees, as the residents cheer in the background.
He later asks to pour a dribble into Charles' cup of tea, to which he replies: "I thought you'd never ask."
It’s a Royal ‘Yes’ for Patrick. #EastEnders pic.twitter.com/oj9N7kwBai— BBC EastEnders (@bbceastenders) June 2, 2022
The royal couple also met the soap's iconic characters Stacey Slater, played by Lacey Turner, and Sonia Fowler, played by Natalie Cassidy.
At the end of the episode, Dyer's character shares a toast "to all the people up and down the country doing exactly the same thing as us, celebrating".
Thestar discovered in 2016 during filming for that he is related to Thomas Cromwell, Edward III, William the Conqueror and Henry III.
The royal couple filmed the scenes for the long-running BBC soap opera in March when they visited the new Elstree set and met the cast and crew.
The Jubilee episode featuring Charles and Camilla aired on Thursday.