The men, all in their 60s, were arrested after a BBC investigation last year sparked an internal police inquiry.
The charges say messages posted in a closed WhatsApp group referred to Harry and wife Meghan, as well as Prince William and his wife, Kate, and the late Queen Elizabeth II and her late husband, Prince Philip.
Some also mentioned UK Prime Minister Rishi Sunak, former Home Secretary Priti Patel and former Health Secretary Sajid Javid.
Robert Lewis, Peter Booth, Anthony Elsom, Alan Hall and Trevor Lewton pleaded guilty at London’s Westminster Magistrates’ Court to sending by public communication grossly offensive racist messages. All are former members of London’s Metropolitan Police Department and spent time with the force’s Parliamentary and Diplomatic Protection branch, which guards politicians and diplomats.
The force said none of the suspects was a police officer when they sent the messages between 2020 and 2022.
A sixth former officer, Michael Chadwell, denied one count of the same charge and is due to stand trial on November 6. The others are scheduled to be sentenced on the same day.
The biracial American actress Meghan Markle married Prince Harry, the queen’s grandson, at Windsor Castle in 2018. In early 2020, they stepped away from royal duties and left the UK, citing what they said were the unbearable intrusions and racist attitudes of the British media.