Origin of the usage of "Man" as a word of exclamation

Solution 1:

It started as a generic vocative expression, like calling somebody "buddy" today -- the word meant "person", the sense of "adult male" came later. According to the OED, it started to switch over to being a more general interjection about 1823.