Neither of your guesses is right. Here, "law" means "the legal profession."
It means that someone studied to be a lawyer, became a lawyer, worked as a lawyer--and then changed careers. He stopped working as a lawyer--he "left the law"--and began doing something different.
Some kinds of work are called "professions." With professions, sometimes we use the same language structures we use for places. Some have special nouns associated with them. Instead of saying "he became a minister" we can say "he entered the ministry." Instead of saying "he became a career soldier" we can say "he entered the military." Instead of saying "he became a doctor" we can say "he entered medicine." You can enter a profession, and you can also leave a profession. The name for the profession of being a lawyer is "the law."
If you're not familiar with wikipedia, I find it to be both very useful and very reliable. Wikipedia's article on Munger is
It says Munger earned a law degree, became a lawyer, founded his own law firm, then gave up the practice of law to become an investment manager. That was "leaving the law."
The details: "he entered Harvard Law School and graduated magna cum laude with a J.D. in 1948... He moved with his family to California, where he joined the law ﬁrm Wright & Garrett (later Musick, Peeler & Garrett). In 1962 he founded and worked as a real estate attorney at Munger, Tolles & Olson LLP. He then gave up the practice of law to concentrate on managing investments and later partnered with Otis Booth in real estate development."