"Esquire" is an honorific that may be used in addressing attorneys. When I am writing a letter to another lawyer, for example, I might address it to "J. Doe, Esq." (instead of "Mr. J. Doe" or "Ms. J. Doe") in the same way that I might address a letter to a judge "Hon. J. Doe." (In some of the smaller Texas towns in which I've practiced, lawyers address each other "Hon. J. Doe," a courtly practice of which I wholly approve.)

Because it is an honorific, it is inappropriate for lawyers to apply it to themselves. Signing your letters "J. Smith, Esq." is a little pretentious, as is referring to yourself as "attorney," "attorney at law," or "attorney and counselor at law."