An intriguing question. I've spent some time researching this etymology in dictionaries as well as the scanned documents available at Google Books and there are apparently a number of competing explanations to the origin of this expression.
The one I believe makes more sense, and also the most often quoted, including by nico and the OED, is that in the times when this word started being recorded, courts were frequently on the move, going from one palace to the next and as a consequence large convoys were organised typically opened by heralds, followed by armed guards protecting high profile personalities and ending with a long line of logistics wagons.
Often found along the phrase "King kitchen", this group of followers were in charge of carrying the coal, the pots and kettles and various items of furniture.
By contrast to the lavish livery of the official guard at the head of the convoy, this rag-tag troop at its tail, composed of people having probably a less demanding idea of their appearance would have ironically been called the black guard. Indeed the "rag-tag" expression itself appears to emerge at the same time.
The kind of characters attracted by these living conditions, in which honesty was probably not a competitive advantage, was such that the term soon became a synonym for both menial jobs and low morale.
Some documents I've read on Google Books (looking for "black guard", with quotes) show that there are some records of large scale exactions ascribed to this "black guard".
Where it becomes interesting is that the French word "blague" seems to come from this alternative and secondary "blaggard" spelling. Today, a "blague" is a joke or a prank. When it appears in France in the 18th century, it has the meaning of a lie. It has kept this meaning in the "sans blague" phrase which emphasises that the related claim is no lie ("no kidding"). TBC I guess.
1. Ben Jonson (under King James)
The word appears in Ben Jonson's masques "Love Restored" in 1612
and "Mercury Vindicated from the Alchemists" in 1615.
The works of Ben Jonson, anotated in 1816 by William Gifford contain two interesting foot notes, reproduced below regading the etymologie of what was at the time just an expression.
Vol 2 p 169
Vol 7 p 250
2. Mid 19th Century Notes and Queries
Easily findable here.
- Notes And Queries Series 1 - Vol 2 section 39, 27th Jul 1850 page 134
- Notes And Queries Series 1 - Vol 2 section 41, 10th Aug 1850 pages 170 to 171
- Notes And Queries Series 1 - Vol 7 section 169, 22th Jan 1853 pages 77 to 79
- Notes And Queries Series 1 - Vol 7 section 176, 12th Mar 1853 page 273
- Notes And Queries Series 1 - Vol 7 section 185, 14th May 1853 page 487
- Notes And Queries Series 1 - Vol 8 section 209, 29th Oct 1853 page 414
- Notes And Queries Series 3 - Vol 4 section 95, 24th Oct 1863 page 339