The captain's personal guard is a special position aboard a starship of the Terran Empire. The guard is personally responsible for protecting the captain or commander of a starship and only takes orders from the commanding officer.
In 2155, MACO Sergeant Travis Mayweather was promoted to serve as the captain's personal guard aboard the ISS Enterprise (NX-01) when the ship's commander, Jonathan Archer, staged a mutiny and made himself captain. In his new position, Mayweather was granted his own quarters and enjoyed better food.
In 2267, the mirror universe double of Captain Kirk was accidentally transported to this universe along with his landing party. Unaware of the consequences his actions in this universe could cause (he ordered a weapons standby when the Halkans refused to give up their dilithium crystals, which was a serious breach of orders), Ensign Chekov felt safe enough to attempt an assassination on the captain in order to rise in rank. Luckily for Kirk, his personal guard Farrell wasn't far away to rescue him. Later on, while having a discussion with Kirk, first officer Spock was accompanied by his Vulcan personal guard who watched Kirk while walking behind his superior. When Farrell saw this, he quickly caught up with them to keep an eye on Spock and his guard. Thus culminating to a famous scene where the suspicious atmosphere of the Terran Empire was blatantly displayed while Spock and Kirk were engaging in something so innocent and simple as a conversation.
It is unknown whether this position existed on a regular Terran Empire starship, or how long this position has existed. Archer could have just created it to secure his leadership. When Archer captured Captain Forrest, the commanding officer of Enterprise until Archer's mutiny, Forrest was only accompanied by a single MACO. It therefore seems likely that the position existed before the mutiny. It should also be noted that Spock having a personal guard of his own showed how almost any one in a high ranking position could have one.