Yes, sexual self-pleasure it is a sin... read:
"Set your affection on things above, not on things on the earth. Mortify therefore your members which are upon the earth; fornication, uncleanness, inordinate affection, evil concupiscence, and covetousness, which is idolatry:" - Colossians 3 : 2 &...