When I was thirteen, I read a story of a man like me.

--------------------------------
Does 'man' mean, #1 or #2 in the sentence?
1. an adult human male
2. a human being of either sex; a person.

It means #1.

The sentence should read like this:
When I was thirteen, I read a story about a man like me.

1. because at the end of the sentence it says "like me" meaning that the narrator is a male.

Thank you. Then when does 'man' mean #2? When does 'man' mean 'person'?

It would refer to people in general if you use the word "mankind" or "humanity," but neither of those words could be substituted in that sentence.

In the sentence you provided, the word "man" is being used in its generic sense to refer to a human being, regardless of gender. Therefore, in this context, "man" corresponds to the second definition you provided: "a human being of either sex; a person."