It's an ironic expression. It really means, "You would think I'm making this up, but I'm not." You usually say that after you tell a story in which someone does something that you think is so ridiculous, crazy, or stupid that one would think it was fiction. Also calling the situation "shit" could add a more dismissive or disapproving tone, or maybe a more informal tone. I'm assuming you know that "shit" is generally considered profanity. People also say "you can't make this stuff up". The examples depend on the viewpoint of the speaker.
An example to me is ---A student's mother wanted her son to be excused from taking his math test because he was tired from his basketball game the night before. When the teacher said that the son could not be excused, the mother threatened to sue the school district. You can't make this shit up!
But another person might think that the mother's request is totally reasonable, so that person would not use the expression "you can't make this shit up" when talking about it.