It really just depends on what cannon you want to get into. It's not a mystery per say, but just that D.C. runs several different universes that aren't really connected. So there's several back stories for all of their characters.
Here's one version, according to Wikipedia: "The most widely cited backstory, which the official DC Comics publication, Who's Who in the DC Universe, credits as the most widely believed account, can be seen in The Killing Joke. It depicts him as originally being an engineer at a chemical plant who quits his job to become a stand-up comedian, only to fail miserably. Desperate to support his pregnant wife, Jeannie, the man agrees to help two criminals break into the plant where he was formerly employed. In this version of the story, the Red Hood persona is given to the inside man of every job (thus it is never the same man twice); this makes the man appear to be the ringleader, allowing the two criminals to escape. During the planning, police contact him and inform him that his wife and unborn child have died in a household accident.[13][14]
The Joker emerges from chemical-ridden water and goes insane in The Killing Joke. Art by Brian Bolland.
Stricken with grief, he attempts to back out of the plan, but the criminals strong-arm him into keeping his promise. As soon as they enter the plant, however, they are immediately caught by security and a shoot-out ensues, in which the two criminals are killed. As the engineer tries to escape, he is confronted by Batman, who is investigating the disturbance. Terrified, the engineer leaps over a rail and plummets into a vat of chemicals. When he surfaces in the nearby reservoir, he removes the hood and sees his reflection: bleached chalk-white skin, ruby-red lips, and bright green hair. These events, coupled with his other misfortunes that day, drive the engineer completely insane, resulting in the birth of the Joker"
But there are several more.