"a boaster," 1570s, formerly also braggard, from French bragard (16c.), with pejorative ending (see -ard) + Middle French braguer "to flaunt, brag," perhaps originally "to show off clothes, especially breeches," from brague "breeches" (see bracket (n.)). There may be an element of codpiece-flaunting in all this.
Also as an adjective, "vain, boastful" (1610s). The word in English has been at least influenced by brag (v.), even if, as some claim, it is unrelated to it. Bragger "arrogant or boastful person," agent noun from brag (v.), is attested in English from late 14c. and has become practically a variant of this word.