Deputy Chief Constable Bill Skelly said: "It is of huge disappointment to me, the force and, I am sure, the communities we serve, that emails of a racist and sexist nature were circulated on our system.
"I consider this to be a very serious matter and have instructed that a 51-year-old police officer is suspended and that further inquiries should be carried out. Initial work has identified another 20 individuals - 16 officers and four police staff - who appear to be involved in this issue. They have been spoken to and advised that they are subject to misconduct inquiries. While these inquiries are ongoing it would be inappropriate to comment further."
He added: "The vast majority of Lothian and Borders Police employees are dedicated to their communities and act at all times with the utmost respect. Unfortunately there are occasions when a very small minority fall well below the standards we expect. I would like to reassure the public that when this happens we consider their behaviour unacceptable and deal with the issue with the seriousness it deserves.
"All staff of Lothian and Borders Police receive extensive training and there are clear guidelines in place on email and internet use. The force is now in consultation with partners and representatives of community groups regarding what additional measures may be appropriate."
There are 249 officers and 47 civilian staff based at G Division.