In the United Kingdom, Esquire historically was a title of respect accorded to men of higher social rank, particularly members of the landed gentry above the rank of gentleman and below the rank of knight. In 1826, William Blackstone reiterated that, "the title should be limited to those only who bear an office of trust under the Crown and who are styled esquires by the king in their commissions and appointments; and all, I conceive, who are once honoured by the king with the title of esquire have a right to that distinction for life."
By the early 20th century, it came to be used as a general courtesy title for any man in a formal setting, usually as a suffix to his name, as in "Todd Smith, Esq.", with no precise significance. In the United Kingdom today, it is still occasionally used as a written style of address in formal or professional correspondence. In certain formal contexts, it remains an indication of a social status that is recognised in the order of precedence.
In the United States, Esquire is mostly used to denote a lawyer in a departure from traditional use and is irrespective of gender. In letters, a lawyer is customarily addressed by adding the suffix Esquire (abbreviated Esq.), preceded by a comma, after the lawyer's full name.
Chief Justice Coke (1552-1634) defined "gentlemen" as those who bear coat armour. From the 16th century such families were defined by the inclusion of their pedigrees within their county's heraldic visitations, which necessitated their submitting a return of their pedigree to the visiting herald at the specified location, generally one of the chief towns of the county. The 1623 Heraldic Visitation for Gloucestershire, for example, includes a section at the back headed:"A note of such as were disclaymed to be no gentilmen within the county and city of Gloucester", the list being headed by "Edward Hill, Customer, of Gloucester, neither gentilman of bloud, ancestry nor armes". The list thus identifies those persons whose returns were not accepted, perhaps because they were fabricated or insufficiently evidenced in some way.
Esquire - A rank next below that of Knight. Besides those Esquires who are personal attendants of Knights of Orders of Knighthood, this title is held by all attendants on the person of the Sovereign, and all persons holding the Sovereign's commission being of military rank not below Captain; also, by general concession, by Barristers at Law, Masters of Arts and Bachelors of Law and Physic.
James Parker  supplied the following definition:
Esquire, (lat. armiger, fr. escuyer): a title of a gentleman of the rank immediately below a knight. It was originally a military office, an esquire being (as the name escuyer, from escu, a shield, implies) a knight's attendant and shield bearer. Esquires may be theoretically divided into five classes:
By the end of the 16th century, the pretentious use of the title, especially in its Latin form, Armiger, was being mocked by Shakespeare in his character Robert Shallow, esquire, a Justice of the Peace:
...a gentleman born, master parson; who writes himself "Armigero," in any bill, warrant, quittance, or obligation, "Armigero."
To which Shallow directly replies:
Ay, that I do; and have done any time these three hundred years.
Nineteenth century tables of precedence further distinguished between "esquires by birth" and "esquires by office" (and likewise for "gentleman"). Today the term "gentleman" is still found in official tables of precedence, and it invariably means a person who is an armiger with no higher rank or a descendant of someone who has borne arms. An English use of the term is to distinguish between men of the upper and lower gentry, who are "esquires" and "gentlemen" respectively, which still applies in terms of the official Order of Precedence. Examples of this may be found in the Parish Tithe Map Schedules made under the Tithe Commutation Act 1836. Later examples appear in the list of subscribers to The History of Elton, by the Rev. Rose Fuller Whistler, published in 1892, which distinguishes between subscribers designated Mr (another way of indicating gentlemen) and those allowed Esquire.
But formal definitions like these were proposed because there was, in reality, no fixed criterion distinguishing those designated esquire: it was essentially a matter of impression as to whether a person qualified for this status. William Segar, Garter King of Arms (the senior officer of arms at the College of Arms), wrote in 1602: "And who so can make proofe, that his Ancestors or himselfe, have had Armes, or can procure them by purchase, may be called Armiger or Esquier." Honor military, and civill (1602; lib. 4, cap. 15, p. 228). (By Armes he referred to a coat of arms; it is not clear from this quotation whether Segar made a distinction between esquires and gentlemen.) For example, lords of the manor hold the rank of esquire by prescription.
Although esquire is the English translation of the French écuyer, the latter indicated legal membership in the nobilities of ancien régime France and contemporaneous Belgium, whereas an esquire belongs to the British gentry rather than to its nobility, albeit that "gentry" in England means untitled nobility.Écuyer in French (11th to 14th century) means "shield-bearer", a knight in training, age 14 to 21. In the later stages of the Middle Ages, the cost of the adoubement or accolade became too high for many noblemen to bear. They stayed écuyers all their lives, making that title synonymous with "nobleman" or "gentleman".
The most common occurrence of the term "esquire" today is in the addition of the suffix "Esq." in order to pay an informal compliment to a male recipient by way of implying gentle birth. There remain respected protocols for identifying those to whom it is thought most proper that the suffix should be given, especially in very formal or in official circumstances.
The breadth of Esquire (as Esq.) had become universal in the United Kingdom by the mid 20th century, with no distinction in status being perceived between Mr and Esquire. Esquire was used generally as the default title for all men who did not have a grander title when addressing correspondence, with letters addressed using the name in initial format (e.g., K.S. Smith, Esq.) but Mr being used as the form of address (e.g. Dear Mr Smith). In the 1970s, the use of Esq. started to decline, and by the end of the 20th century most people had stopped using it and changed to using Mr instead. Esq. and it was generally considered to be old-fashioned but was still used by some traditional individuals. However, from around 2010 it has started to return once more as a formal address to a male in business and also in a social setting, particularly where the status of an individual is unknown so is used more as a general courtesy title. Its usage has always remained constant with organisations such as Christie's and Berry Bros. & Rudd. British men invited to Buckingham Palace also receive their invitations in an envelope with the suffix Esq. after their names, while men of foreign nationalities instead have the prefix Mr (women are addressed as Miss, Ms, or Mrs). The same practice applies for other post from the palace (e.g., to employees).
Esquire is historically a feudal designation in Scotland. Today, the title of esquire is defined as a social dignity that refers to people of the Scottish gentry, who hold the next position in the Order of Precedence above Gentlemen. It is also used as a common courtesy in correspondence. Traditionally, this was one who was classified as a 'cadet for knighthood'. Today, the title of esquire is not bestowed on gentlemen, although certain positions carry with them the degree of esquire, such as that of advocate or Justice of the Peace. Whether an armiger is a gentleman, an esquire, or of a higher rank can be told by the type of helm depicted on the Letters Patent granting or matriculating the arms. In Scots Heraldry, Sir Thomas Innes of Learney makes clear that a gentleman's helm is a closed pot helm, in plain steel, with no gold, whereas an esquire's helm can be a steel pot helm garnished in gold or a helmet with a closed visor garnished in gold. The Court of the Lord Lyon will display the helm appropriate to their "degree", or social rank, in the illustration on the Letters Patent.
The definition of esquire today includes:
There is some confusion over the fact that the Lord Lyon King of Arms addresses correspondents by their name followed by "Esq." in correspondence, namely on letters. Some people erroneously believe that this makes them an esquire, however this is a common courtesy in Scotland, as in the rest of Britain, and does not constitute official recognition in the degree of an esquire. The Scottish courts have confirmed that the base degree in which an armiger is recognised is the dignity of gentleman, not esquire.
In feudal times an esquire was an armour-bearer, attendant upon a knight, but bearing his own unique armorial device. Similarly, an armiger in contemporary terms is well-defined within the jurisdiction of Scotland as someone who is an armour-bearer. These two senses of "armour-bearer" are different: An esquire in feudal times was an "armour-bearer" in the sense of being the person who carried their knight's armour for them; whereas in the contemporary sense the term "armour-bearer" is being used to mean the bearer of a coat of arms, an armiger. The two are not the same thing, although the feudal esquire would also most likely have been an armiger. For centuries the title of esquire has not been bestowed on a knight's attendee (since knights no longer need to train for battle). Attendants on knights, however, were not the only bearers of arms, and similarly not all armigers were esquires. Today, being an armiger is synonymous with the title of gentleman within the Order of Precedence in Scotland, and is a social dignity. The letters patent of Scottish armigers will never include the title of gentleman, because the letters patent themselves evidence the individual is an armour-bearer, or gentleman by the strictest sense of the definition. A Scottish armiger is a gentleman or gentlewoman unless they hold a higher rank.
Scottish armigers are those individuals with a hereditary right, grant or matriculation of Arms so entitling them to use personal arms by the Court of the Lord Lyon. The bearing of duly registered arms is an indication of nobility (either peerage or non-peerage in rank). All Scottish armigers are recognised as members of the nobility in the broader sense through their grant or matriculation of arms awarded by the Crown or Sovereign through the Court of the Lord Lyon, and by issuance of a warrant from the Lord Lyon King of Arms is so entered in the Public Register of All Arms and Bearings in Scotland and through later official "Ensigns of Nobility". Without such legal arms it is practically impossible to prove one's nobiliary status. "Technically, a grant of arms from the Lord Lyon is a patent of nobility (also referred to a 'Diploma of Nobility'); the Grantee is thereby 'enrolled with all nobles in the noblesse of Scotland.'", however the term "nobility" today is little used in this context, as in common parlance in Britain the term is widely associated with the peerage. Instead the French term of noblesse has been used by the Court of the Lord Lyon as this term not only includes peers but also the non-peerage minor-nobility, which includes baronets, knights, feudal barons, armigers with territorial designations, esquires and gentlemen.
In the United States, the term is almost exclusively reserved for lawyers, much as one with a Ph.D. or M.D. is called "Dr." or a knight becomes "Sir." 
In the U.S., the title esquire is commonly encountered among members of the legal profession. The title is not allocated by the law of any state to any profession, class, or station in society. However, some states protect the use of the term esquire, and have held that use of the term connotes licensure in the jurisdiction, amounting to unauthorized practice of law.
Similarly, when addressing social correspondence to a commissioned officer of the United States Foreign Service, esquire may be used as a complimentary title. While the abbreviated Esq. is correct, Esquire is typically written in full when addressing a diplomat. If any other titles are used on the same line, Esquire is omitted.
Honorifics are not used with courtesy titles, so John Smith, Esq. or Mr. John Smith would be correct, but Mr. John Smith, Esq. would be incorrect unless used for an attorney.
When addressing a person who has an academic degree or other post-nominal professional designation, such as a Certified Public Accountant, a writer should use either the post-nominal designation (usually abbreviated) or the Esq., but not both; as when esquire is used as courtesy title, it should not be used with post-nominals.
Before 1947, the term esquire was used by senior officers of the Indian Civil Service and other members of the government. In keeping with the criteria established centuries earlier, the title was mostly used by government officials who studied or trained in England, especially in the universities of Oxford, Cambridge, or London or other professional organisations managed by the government. Barristers were especially included in the order of the esquires. Members of the armed forces as well as those who were inducted in to it from other services, temporarily or permanently, were also called esquires.
British men have 'Esq.' after their name [...] whereas all men from overseas are called 'Mr'