They can mean the same thing - purpose
The difference is in the degree and the range of meaning.
If I say "He didn't mean anything by it.", it means that there was no bad intent, that there was no insult. I could understand what he said and it wasn't offensive.
If I say "What he said does not make any sense.", it means that what he said cannot be understood. If he was trying to say something, I don't know what it is.
'Meaning' is also more serious.
If I say my life isn't making any sense, it means that things aren't going well and I'm not sure what to do about it.
If I said my life has no meaning, it means I am in serious depression. It would be a more negative comment.