The megas doux (Greek: μέγας δούξ pronounced [ˈmeɣaz ˈðuks]; English: grand duke) was one of the highest positions in the of the later Byzantine Empire, denoting the commander-in-chief of the Byzantine navy. It is sometimes also given by the half-Latinizations megaduke or megadux (from Greek μεγαδούξ). The Greek word δούξ is the Hellenized form of the Latin term dux, meaning leader or commander.
The office was initially created by Alexios I Komnenos (r. 1081–1118), who reformed the derelict Byzantine navy and amalgamated the remnants of its various provincial squadrons into a unified force under the megas doux. The Emperor's brother-in-law John Doukas is usually considered to have been the first to hold the title, being raised to it in 1092, when he was tasked with suppressing the Turkish emir Tzachas. There is however a document dated to December 1085, where a monk Niketas signs as supervisor of the estates of an unnamed megas doux. The office of "doux [commander] of the fleet" (δούξ τοῦ στόλου, doux tou stolou), with similar responsibilities and hence perhaps a precursor of the office of megas doux, is also mentioned at the time, being given ca. 1086 to Manuel Boutoumites and in 1090 to Constantine Dalassenos.
John Doukas, the first known megas doux, led campaigns on both land and sea and was responsible for the re-establishment of firm Byzantine control over the Aegean and the islands of Crete and Cyprus in the years 1092–93 and over western Anatolia in 1097. From this time the megas doux was also given overall control of the provinces of Hellas, the Peloponnese and Crete, which chiefly provided the manpower and resources for the fleet. However, since the megas doux was one of the Empire's senior officials, and mostly involved with the central government and various military campaigns, de factο governance of these provinces rested with the provinces' praitōr and various local leaders. During the 12th century, the post of megas doux was dominated by the Kontostephanos family; one of its members, Andronikos Kontostephanos, was one of the most important officers of Emperor Manuel I Komnenos (r. 1143–1180), assisting him in achieving many land and naval victories.