The origin of Mercogliano goes back to the last decade of the 6th century, when the Lombards invaded Southern Italy. A refugee population from Abellinum in order to hide from the Lombards, settled down on one of the hills of Mercogliano. The name of the place was first mentioned in a document of 982 AD.
The fiefdom was part of the county of Avellino, whose first lord was Ruggiero of Aquila, who received the town and the Abbey of Montevergine with a donation from king Frederick II (mid-13th century). Later on the abbots were the feudal lords of Mercogliano. Between 1861 and 1866 the Abbey of Montevergine lost all its power and became a national monument.