There doesn't seem to be a clear origin. Several wishful thinking suggestions have been advanced but none seems well-supported or widely accepted.
Etymonline suggests it might derive from expressions like "there was no man alive who...", quoting Swift "they were sure no man alive ever writ such damned stuff as this". It's possible you might move from this to shouting "no man alive!" and even more incoherently "man alive!" but there doesn't seem to be much evidence.
The idea that it comes from sailors is a theory, advanced by people including Ben Kentish of LBC (London, UK radio station), but searches fail to turn up evidence that this was a particularly popular thing for sailors to shout.
Another theory advanced on bulletin boards (but nowhere else that I can find) is that it derives from a similar Welsh phrase, Dyn byw, which means "man alive" but is a minced oath for saying God (Duw). (AnswerBag)
"Man alive" is also a bingo nickname for the number five, but we can assume that's later. (Wikipedia: List of British bingo nicknames)
The OED's entry for alive points to similar, and sometimes older, sayings like Good sakes alive, Christ alive, etc, from the 18th or 19th century, with its first citation of "man alive" from 1839 in the American writer Caroline Kirkland, but it doesn't have an entry or give an origin for "man alive".
"Man" is also commonly used as an ejaculation: the OED (man n1) has it going back to Old English "Used to address a person (usually a man, but sometimes a woman or child) emphatically to indicate contempt, impatience, exhortation, etc." So "man alive" may be an extension of that.
Writing Explained is one of several sites that doesn't reach a clear conclusion, and that seems the wisest outcome.