It either means to fabricate/invent/lie about something or it means to do something that you should have done previously. Both have to do with 'missing' something, in the case of lying, it's replacing an inconvenient truth with a more beneficial detail, story, that was 'missing' from reality.
First case:
"I can't recall the details, and I don't want to make anything up, so I won't say anything." Here, 'to make up' would be to lie, fabricate a story, 'come up with a story,' etc. Here, it would have a negative connotation.
"Inventors don't have a preexisting blueprint for their design, so they have to make it up as they go along." Here, it has a neutral or positive connotation.
Second case:
"Johnny missed class last week, so when he returns, he will have to make up the work he has missed.