The story
From black + guard, thought to have referred originally to the scullions and lower menials of a court, or of a nobleman's household, who wore black liveries or blacked shoes and boots, or were often stained with soot.
Etymology from Wiktionary, CC BY-SA 4.0.