"two-masted square-rigged vessel," 1720, colloquial shortening of brigantine (q.v.). Apparently such vessels being used for prison ships upon retirement from active duty led to extended meaning "a jail," first recorded 1852.[brig etymology, brig origin, 英语词源]