Although this not a legal question it is one that comes up often so I decided to address it in my blog.
Esquire (abbreviated Esq.) originally was a social rank title above that of mere gentleman, allowed, for example, to the sons of the nobles and the gentry who did not possess any other title. On this basis, a gentleman was designated Mr ('mister' before his name), whereas an Esquire was designated 'Esq.' (without a nominal prefix) after his name. A very late example of this distinction is in the list of subscribers to The History of Elton, by the Rev. Rose Fuller Whistler, published in 1882, which clearly distinguishes between subscribers designated "Mr" and those designated "Esquire" — of higher social position; though old-fashioned, "Esq." remains widely used in upper-class circles.
In the United States, there are no native titled gentry or nobility. The suffix "Esq." has no legal meaning (except in some states), and may, in theory, be adopted by anyone, (given its meaning, any man). In practice, it is used almost exclusively by lawyers (of both sexes), and so it generally may be assumed that, when "Esq." appears on business cards or stationery, the man or woman so identified is a member of the bar.
That "esquire" may be used to indicate that an individual is a lawyer is a remnant of the British practice, in which barristers claimed the status "Esquire" and solicitors used the term "Gentleman". In the United States, though a lawyer may choose to specialize in litigation or other types of law, there are no licensing or bar membership distinctions between the equivalent roles of barrister and solicitor.