"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.