In terms of career opportunities, law is terrible. There is a glut of lawyers, and if you aren’t picked up by a good firm right out of school, you won’t be picked up later, most likely. The JD is seen as a key to all sorts of jobs, so people have been charmed into taking it without paying attention to the pay of lawyers, as that declined. Some lawyers are very rich, but many don’t make enough to justify the cost of their degree. If you go into the less glamorous, poorly-paid aspects of the law, you will be able to find a job, but not for decent pay. If you don’t attend a name school, you might find yourself out of work, or doing work unrelated to your degree.
In fact, there’s only one thing worse than the job market for lawyers - that for PhDs. So you’re in a bit of a bind there. Overall, I’d say opportunities as a PhD are worse, but it’s close. Whichever one you do, it might be good to have a second degree to help. For instance, add a masters to your JD, or while doing a PhD, also get a masters in law.
Can you do libertarian work in law? Absolutely - criminal defense. Just talk to some criminal defense attorneys first and make sure you’re comfortable doing what they do. Learn what it’s really about, not the tv version. Understand that the job involves a lot of making personal friendships with DAs and judges, and then using those social connections to get plea bargains for your clients, innocent or guilty. Ask yourself how you will feel advising your client, whom you believe to be innocent, to plead guilty because he’ll lose at trial - and how you’ll feel pleading a murderer whom you know to be guilty to a much reduced offense. What kind of attorney are you willing to be? Are you willing to play ball in order to reduce the harm done to your clients, or will you strive to be a star defense attorney, being brought in for cases that go to trial? If the latter, are you prepared to lose at trial? Make sure this is something you can handle.
Another area is tax law, but many of the same concerns apply, except that in tax court, the prosecution’s burden of proof is lower.
To be a lawyer, you have to work in the system as it exists, day in and day out. Are you prepared for that?
As a professor, you can advocate for your position, and influence your students. Realize that all your colleagues will be telling those students what a nut you are and how lucky you are for tenure. Your coworkers will answer your comments with absurd non-sequitors - economics and history faculty at my school tell my students that I might as well be a communist, since freedom only works on paper. I’m at a very friendly school as regards toleration of ideas outside the comfort zone - this is a tame response to someone who dares speak about freedom. I’m also referred to as biased - but teachers who tell their students that Lincoln was the greatest President ever, or that habeas corpus is outdated, or that global warming is a proven fact, or that free-market money is absurd and gold is a barbarous relic, are referred to as unbiased and reasonable. Such is the state of the world. Still, you might get through to some of your students, and send them out to advocate those positions -this is more than you can accomplish as a lawyer.