Old English mægen (Mercian megen) "power, bodily strength; force, violent effort; strength of mind or will; efficacy; supernatural power," from Proto-Germanic *maginam "power" (source also of Old High German megin "strength, power, ability"), suffixed form of PIE root *magh- "to be able, have power."
Original sense of "power" is preserved in phrase might and main. Also used in Middle English for "royal power or authority" (c. 1400), "military strength" (c. 1300), "application of force" (c. 1300). Meaning "chief or main part" (c. 1600) now is archaic or obsolete. Meaning "principal duct, pipe, or channel in a utility system" is first recorded 1727 in main drain.
Used since 1540s for "continuous stretch of land or water;" in nautical jargon used loosely for "the ocean," but in Spanish Main the word is short for mainland and refers to the coast between Panama and Orinoco (as contrasted to the islands of the West Indies).