In the different retellings of the Robin Hood legend, the character of the Sheriff of Nottingham seems to vary in terms of his authority and social standing. Sometimes he's subordinate to the local nobleman, while other times he's the lord of his own manor. Sometimes he lives in his own castle, while other times he seems to be nothing more than an elected (even if by corrupt means) commoner. Is there any evidence or basis for what the actual authority and position of the Sheriff of Nottingham would've been during the 12th century (when the most popular of these legends take place)?
An earl is a member of the nobility. The title is Anglo-Saxon, akin to the Scandinavian form jarl, and meant "chieftain", particularly a chieftain set to rule a territory in a king's stead. In Anglo-Saxon England, earls had authority over their own regions and right of judgment in provincial courts, as delegated by the king. They collected fines and taxes and in return received a "third penny", one-third of the money they collected. Earls were essentially provincial governors.
After the Norman Conquest, William the Conqueror modified ranks of nobility to his own liking. Shires became the largest secular subdivision in England and earldoms disappeared. Some form of delegated authority was still needed to administer authority over shires and provide judgment in shire courts. The rank assigned to such shire administrators was "Sheriff".
As political reward and sometimes forced accessions, various Earl ranks came back into existence. On a case by case basis, the Earl might have authority over a Sheriff. Other Sheriffs were superseded only by the crown.
As the crown weakened up to and after the Magna Carta, Kings feared the relative increase in power of Earls. In reaction, Kings placed more and more administrative, tax collecting, and legal authority in Sheriffs at the expense of Earls.
The fictional Sheriff of Nottingham would have been chief tax collector and chief legal officer in Nottinghamshire. The local nobility probably would have believed the Sheriff was impinging on the right and proper feudal authority of local nobles. Hence, the myth of a noble leading a gang of thieves and monks in rebellion against a Sheriff has some basis in reality or at least sounds plausible.
Citation: "A History of England" By C. E. Carrington, J. Hamden Jackson, Cambridge University Press