Vocabulary.com has a pretty nice definition of the word:
"A harangue is more than a speech, louder than a discussion, and nastier than a lecture. It is a verbal attack that doesn't let up, delivered as a verb or received as a noun. Either way it's pretty unpleasant."
There's a lengthy list of synonyms: :tirade, diatribe, lecture, polemic, rant, fulmination, broadside, attack, onslaught--all pretty great words in themselves. The emphasis seems to be on the length and aggression of the speech, and to some extent it's public nature. Also, perhaps, on its excessiveness and unpleasantness. People may say, that was a great rant, but I don't think they'd normally say, what a fine harangue.
But apparently harangue came out of a more neutral context. According to the Online Etymology Dictionary, the word or at least a variant of it seems to have come to Scotland as arang (mid fifteenth century) before England (around 1600). In Middle French, a harangue simply meant a public address and came from the Old Italian aringo, which wasn't even about the speech but referred to a public square, platform, pulpit or arena. And the general idea seems to be that this in turn is taken from an older German word, hring (circle) "with an -a- inserted to ease Romanic pronunciation of Germanic hr-", or maybe even a postulated compound like *hariring, which would mean host-ring or army-ring.
|"Lucius Martius, Roman knight, haranguing his soldiers."|
"Unlawful to discharge a firearm, firework or explosive, set fire to a combustible, make a harangue or oration, or utter loud, threatening or abusive language in the Supreme Court Building or grounds."
Best not to go panhandling around there either.