According to Gallic lore, onion soup was invented when King Louis XV found himself stranded at a hunting lodge late one night with nothing in the pantry except onions, butter and champagne. This story is obviously apocryphal. For one thing, onion soup has been made for as long as there have been fire, water, people and onions; it didn't need some peckish monarch to invent it. For another, proper onion soup takes hours to prepare — if you were urgently hungry late at night, it would be one of the least efficient things you could make. Also, isn't squandering champagne tantamount to flag-burning in France? I suspect that this hunting lodge legend has more to do with Louis XV's popular image as a debaucherous do-nothing king than with French onion soup per se.
But the legend does get two things right: One, French onion soup is the perfect thing to eat after spending a long day enjoying the great outdoors (especially when it's chilly outside); two, French onion soup should satisfy refined palates. You're on your own for that first thing, but I can help with the second.
The key to good French onion soup is to cook the onions so long that they threaten to melt into a viscous, dark brown paste, à la Marmite. There are no shortcuts when you're caramelizing onions; it always takes at least an hour, usually longer. And it's better to err on the side of low heat than to try to speed things up by ratcheting the heat up to medium — the higher the heat, the more likely it is that the onions will scorch when you walk away from them.
Many people will tell you the other key to good French onion soup is to use homemade stock. (Beef is traditional; chicken is perfectly good; vegetable is fine in my book, although I am well aware that many consider it comparable to a "liquefied compost heap.") It's true that homemade stock is superior to storebought, and it's also true that you can make stock in about the same amount of time it'll take you to caramelize your onions, but I am nonetheless not a stickler on this point. I would never use bouillon cubes, which are as boring as the sex lives of Arcade Fire (according to one cranky music critic). But there are some decent commercial stocks sold in cartons, and I'm fond of the jarred concentrated pastes that are meant to be diluted into something very much resembling good stock.