mid-13c., "high officer of the royal court," charged with regulating ceremonies and maintaining order (early 13c. as a surname), from Old French mareschal "commanding officer of an army; officer in charge of a household" (Modern French maréchal), originally "stable officer, horse tender, groom" (Frankish Latin mariscaluis) from Frankish *marhskalk or a similar Germanic word, literally "horse-servant" (compare Old High German marahscalc "groom," Middle Dutch maerschalc).
This is from a Proto-Germanic compound of *markhaz "horse" (see mare (n.1)) + *skalkaz "servant" (source of Old English scealc "servant, retainer, member of a crew," Dutch schalk "rogue, wag," Gothic skalks "servant"). It corresponds to Old English horsþegn.
From early 14c. as "military commander, general in the army." In the U.S., a civil officer appointed by the president (with advice and consent of the Senate) in each judicial district as the executive officer of the Supreme Court and the federal courts in his district. For sense development and the tendency of officers of the stable to become chief officers of royal households, compare constable. Also from Germanic are Italian scalco "steward," Spanish mariscal "marshal."