The Royal Guards are commanded by Razoul, patrolling both the palace and the streets of Agrabah. Apart from Razoul, there are three commonly appearing guards in the series. They serve as both as Agrabah's police force and Jafar's henchmen during his time as Royal Vizier.
In the first movie, the guards are the main security force of Agrabah, mainly keeping the royal family safe or trying to stop thieves from stealing. The Royal Guards are also shown to keep trying to arrest a certain street rat that always gets away from them: Aladdin. Later, by Jafar's orders, they eventually find Aladdin's hovel and arrest him, but at the same time, they also find Princess Jasmine, who had earlier escaped from the palace. When she orders them to release him, Razoul, the Captain of the Royal Guards, apologizes saying they can't due to the orders being from the Grand Vizier.
For the rest of the film, the guards don't do much, having only a minor/recurring role, but some of them, along with Razoul, do appear when a disguised Aladdin, who goes under the name of "Prince Ali" arrives in the city, seeking Princess Jasmine's hand in marriage. Later on, after Aladdin and Jasmine arrive back at the palace after going on their first carpet ride together, the guards, under Jafar's orders, kidnap Aladdin, knock him unconscious, and throw him off a cliff. It's most likely that Jafar had hypnotized the guards into doing these deeds or lied to them, saying "Prince Ali" was up to no good. After that the guards don't appear for the rest of the movie.
In the second film, despite being engaged to marry Jasmine, the guards haven't changed their opinion of Aladdin, seeing him nothing than a mere "street rat" as they always have. They are shown to have, again, a bit of a minor/recurring role as they had in the first film. They first appear trying to arrest the thief Abis Mal, who then escapes in a wagon carrying chickens and eggs, and then later appear when the Sultan tries to have the guards arrest Iago. Later, when Aladdin arrives back at the palace to let everyone know that the Sultan had been kidnapped, the guards however have been deceived by Jafar, and arrest Aladdin, believing him to have murdered the Sultan. Later, the guards, under "Princess Jasmine's" orders, are to have Aladdin die at dawn as punishment via being beheaded by Razoul, when really it was Jafar disguised as Jasmine, when the real princess had already been captured and locked in Jafar's lair. However, thanks to Iago, he was able to free Genie, and thus saved Aladdin before he was killed by Razoul.
In the third film, Razoul and his men are running security for the impending wedding of Aladdin and Jasmine, despite still having some mutual dislike for the former street rat. When the Forty Thieves attack the wedding, Razoul and his men do their very best at fighting them off, but prove to be outmatched by the legendary bandits. After the former member Sa'Luk meets Razoul one night to offer the guards a chance to apprehend the Forty Thieves in return for immunity from prosecution, and provides the magic phrase to gain access to the Forty Thieves' hideout, Razoul takes his men to the hideout and manages to arrest 31 of the Forty Thieves. After Sa'Luk then reveals that Aladdin's father, Cassim, is the leader and King of Thieves, Razoul and his men ambush Cassim and Iago in the Royal Treasure Room when they attempt to steal The Oracle, and then present the apprehended to the Sultan, Aladdin, and Jasmine. Though still shocked by learning that Cassim is the King of Thieves, the Sultan does his duty, and with a heavy heart, tells Razoul and his men to lock Cassim and Iago up in the dungeon for life. However, some time later, as Razoul is preparing for some sort of reward or promotion from the Sultan while in the barracks, he and his men are ambushed by Aladdin, disguised as his father in his King of Thieves outfit, and pursue him into Agrabah. Though Razoul catches Aladdin, he is knocked out by Cassim, and his men pursue both father and son as they flee Agrabah on horseback. However, Aladdin turns around and returns to surrender willingly to them, out of love for Jasmine, refusing to abandon her like Cassim abandoned him and his mother. Razoul takes Aladdin back to face punishment from the Sultan, but with convincing from the Genie, Jasmine, and Aladdin himself, the Sultan decides to pardon Aladdin for his crimes. Afterwards, once the remaining Forty Thieves are dealt with by Aladdin, Jasmine, and the others, the guards resume their duties with providing security during the wedding as Aladdin and Jasmine are married, and Razoul is caught off-guard when he catches Jasmine's bouquet, leaving him with a surprised look on his face.
After helping the unconscious Aladdin in the desert and visiting Agrabah, the player can talk to the Palace Guards for the first time. The guards explain that the city is under attack of the Heartless and that the defense is not going well. The Heartless seem to be emerging from a legendary cave on the other side of the desert and after the attack on some of their comrades, they ask the player to follow their footsteps in the desert to find the attacker. The player arrives in time to save a guard from a Fat Bandit who reveals, that the Heartless are appearing in the royal palace too.
As it turns out, another Fat Bandit is already marching to the palace gates with the guards being unable to stop him. The player also defeats this one but is repelled by an unknown Heartless. Gladly Aladdin arrives just in time to help the player against this new foe but before being destroyed, the Heartless vanishes.