Which one is better is going to be in large part personal preference. Pick out a few random (or purposefully selected) verses from both the old and new testaments and read them out of both translations comparing which seems easier to understand or less awkward. I find them both to be good translations overall, and personally I prefer to study out of NASB, but there's no clear-cut right answer to which is "better"--kind of depends on your criterion.
NASB is a little closer to "literal" as far as things like word order than ESV, but there are a couple words here and there where I found ESV was actually translated slightly more consistently (the Hebrew words for veil vs curtain in Exodus for example). Some people find NASB awkward to read aloud and wordy--personally, it doesn't bother me, but it is a slightly higher "reading level", so if it seems difficult to understand to you, it might not be your ideal translation.
Another consideration might be selection of bibles to choose from. With NASB, you will have a larger selection of available study-bibles that have useful commentary to help explain non-obvious things in the material. ESV is a bit newer, so the selection of study-bibles is much more narrow at this point (just one I believe), but that one suits your fancy, the breadth to choose from may be irrelevant.
Another nice feature of NASB is the availability of Strongs concordances keyed to that exact translation. As far as I am aware, ESV does not have a Strongs keyed text available.
Another useful way to evaluate the bibles is to read the preface in each and read about their translation philosophies that went into making that bible. One may resonate with you more strongly than the other.