This trope has moved from being a badass boast to being a joke fairly recently, considering that it peaked in the 80s and can be traced to 1902. Esoteric is our other middle name.
Watching this supercut made me wonder who popularized this trope. Thankfully, Stephen Chrisomalis at Glossographia had already done the legwork for me. The Oxford English Dictionary's history of this figurative use dates back to 1905, with the New York Journal's "For retiring you're—well, that's your middle name." Chrisomalis found an earlier one from a Canadian paper in 1902:
He also notes that there was a peak of usage around 1920, a period of waning, and then a steady rise in usage staring in the 1960s, until it reached the media saturation levels we currently know and love. Given that it's a phrase that feels very modern, it's interesting to note how long people have been joking about their middle names.