Beylik of Hacıemir (also called Beylik of Bayram) was a beylik in the north Anatolia in a part of 14th and 15th centuries. The historical documents about the beylik are scarce. In some documents the beylik was named Bayramoğulları (Bayran's sons) and in other Hacıemiroğulları (Hacıemir's sons). Actually Hacıemir was Bayram's son. In Greek documents the name of the beylik was "Chalybes beylik"
The beylik population was mostly Chepni people, a branch of Turkomans. In the 11th and 12th centuries, they were in Danishmend realm. After Seljuks of Anatolia conquered Danishmends some of them were settled in other parts of Anatolia. But some stayed in their former land. After the collapse of the Seljuks and the end of Mongol dominance, they founded a number of small beyliks. Beylik of Hacıemir was one of them. Their capital was present Kale village next to Mesudiye in Ordu Province.
In the early 14th century the region was under Mongols and later the beylik of Eretna. The beylik declared independence during the civil war in Mongol lands (1335-1336) . First bey was Bayram. Bayram fought against the Empire of Trebizond. In 1348 in alliance with several other beys he laid a siege on Trebizond (present Trabzon). But the coalition was defeated. Bayram's death date is not known. But according to the documents of the Trebizond Empire in 1357 it was Hacıemir, Bayram's son who campaigned to Maçka. However, in 1358 by marrying to Theodora, daughter of Basil of Trebizond, he formed family relations with the Trebizond Empire. But in 1361 he organized a campaign to capture Giresun which ended in failure. He formed alliance with the powerful warlord Kadı Burhanettin. With this support Hacıemir was able to capture Ordu (ancient Cotyora) on the Black Sea coast in 1380. The new capital of the beylik was in the village of Eskipazar now a suburb of Ordu
In 1387, Hacıemir fell ill and bequeathed his beylik to his son Süleyman. However he recovered and tried to regain his possessions. This caused a civil war between the father and the son. Although Tacettin, the bey of neighbour beylik attacked to take advantage of the civil war he was defeated and killed in the battle front. In 1397 Süleyman captured Giresun (ancient Kerasous ).
After the death of Kadı Burhanettin, Süleyman accepted the suzerainty of the Ottoman Empire. Although the Ottomans were defeated in the battle of Ankara and the beylik of Hacıemir experienced a second term of independence, it never gained its former glory. In 1427 Ottomans annexed the beylik.