The bible doesn't have the word 'masturbation' and it doesn't describe the act. The closest act recorded in the bible, that I can think of, is when Onan in Genesis 38:9, in accordance with the law of Israel, went in to sleep with his deceased brother’s wife in order to carry on the family name. But instead of completing the act, he spilled his semen on the ground. What he did was wicked in the Lord’s sight and so the Lord put him to death. But God’s anger was not kindled because he spilled his semen per se, but that he refused to be obedient to the Lord’s command and provide for his brother’s wife.
The bible also speaks of ‘nocturnal emissions’, which made the Israelite male unclean and which forced him out of the camp until the period of cleansing had been observed. Widen the survey a little and we find the phrase 'sexual immorality' which is a catchall phrase used for all manner of sexual impropriety and infidelity. In fact, the general thrust of the bible’s comment on sexual activity is extensively positive in the context of marriage and extensively negative outside the context of marriage. ‘Each man should have sexual relations with his own wife and each woman with her own husband’ Paul says in 1 Corinthians 7:2. And, Hebrews 13:4 says ‘Marriage should be honoured by all, and the marriage bed kept pure, for God will judge the adulterer and all the sexually immoral’. And, more generally, back in 1 Corinthians 6:20, in the context of sexual purity, Paul says that we are to ‘honour the Lord with our bodies’.
Widening out still further, the bible speaks in more principled terms about self-control and lust. In terms of self-control, 1 Corinthians 7 says that a husband and wife should not abstain from sex for long periods. And the main reason given, is so that Satan may not tempt either of them into a lack of self-control. It’s not clear what is in view – marital unfaithfulness or masturbation – but either way, the point is that self-control in the context of sexual activity is significant. In Titus, young women are to be ‘self-controlled and pure’ and young men are to be 'self-controlled'.
In terms of lust, the man who looks lustfully at a woman has committed adultery with her in his heart according to Jesus (Matthew 5:28). Paul in 1 Thessalonians 4:4-6 may well have had masturbation in mind when he says, ‘that each of you should learn to control your own body in a way that is holy and honourable, not in passionate lust like the pagans, who do not know God; and that in this matter no one should wrong or take advantage of a brother or sister. The Lord will punish all those who commit such sins, as we told you and warned you before.’
It’s possible that he’s referring again to adultery, which if a spouse commits, does result in them taking advantage of both the one they commit adultery with and their own spouse. And the command carries a warning, which is not insignificant. God does not take sexual impropriety lightly. The point, at the very least here, is that self-control must be exercised in sexual activity and pagan-like lust must be avoided.
So, putting it all together, it’s clear that God has made people to be sexual creatures (Genesis 3:16), with sexual organs and sexual desires as constituent parts of who they are. It’s also clear that the sexual organs can be used both rightly and wrongly when sexual desire arises. Furthermore, we can see that the sexual organs have been made to be very sensitive – no doubt to maximise pleasure – and are therefore easily stimulated. We have also been shown that a sexual desire in connection with another person can either be holy or unholy (lustful) depending on whether the object of the desire is a marital spouse or not. Lusting may not result in sexual activity, but it is still wrong outside of the marriage context. But clearly any sexual activity that arises from lust would therefore, also be wrong outside of the marriage context.
Therefore, it seems very unlikely that masturbation (outside of the marriage context) is not at least a part of what Paul has in mind when he repeatedly uses the phrase ‘sexual immorality’. What I mean by ‘outside the marriage context’ is, where a husband and wife may stimulate each other, or themselves, as part of mutual and consensual marital sexual activity.
It also seems unlikely that since masturbation is an act that arises from a sexual urge, that to take control of that sexual organ and use it in a way that is not a part of marital sex is not to exercise self-control over that member. And lastly, since arousal is often stimulated by attraction to the opposite sex, that masturbation will often keep step with lust - which God hates.
Having said all that, since sexual stimulation happens so frequently, and since masturbation is both pleasurable and accessible, it’s very likely that most adults have practiced masturbation at some point in their lives and that single adults may particularly struggle with ongoing temptation to masturbation. It also seems likely that most adolescents who are going through puberty, or who don’t have a sexual partner are likely to dabble in masturbation fairly frequently. Those realities don’t make masturbation right, but they do mean that for many Christians, masturbation either has been, or continues to be a challenge in their lives.
Perhaps Paul acknowledges this to be the case when he says to the single person, ‘if they cannot control themselves, they should marry, for it is better to marry than to burn with passion’ (1 Corinthians 7:9).
It may be possible for an individual to alleviate their pent-up sexual desire without focussing on a person in their mind’s eye, and to do so without uncontrolled frenzy of sexual expression, so that, an act of masturbation doesn’t fall foul of lack of self-control or lust. But Paul seems to say, it’s still better to marry!
We live in a pornified world where even advertisements are provocatively sexual - where you can be viewing the latest worldwide GDP figures on the world wide web and find your peripheral vision filled with lingerie adverts modelled in the flesh. Where period drama is no longer a sex-scene-safe place. These realities represent, potentially, an hourly battle for purity. Men and women will differ in their particular challenges - men may be more likely to struggle with image, women with romance, as sources of stimulation - the point is the challenge is there for both men and women.
The battle starts before the advert though, or before the show. It starts with a heart that is satisfied in God. It starts with faith in the promise of God to satisfy our heart's desires, so that, when the moment of temptation arises, and Satan plants the promise that sin will satisfy, we are ready to fight the lesser promise with a greater promise. It's the truth that's sets us free from the shackles of sin - the walk of freedom is the walk that repeatedly ambles amongst the primrose-garden precepts of God (Psalm 119:45).
Masturbation, outside the marriage context, then, probably falls into the category of sin and needs to be battled against and repented of. From personal experience, it is a hard battle and perhaps one of those sin habits that is easily entered into and not so easily broken. The Lord has made marriage to be the sphere where sexual desires are both expressed and satisfied. By His help, those of us who are single and who desire to be pure, through prayer, can overcome in God’s grace. ‘No temptation has overtaken you except what is common to mankind. And God is faithful; he will not let you be tempted beyond what you can bear. But when you are tempted, he will also provide a way out so that you can endure it’ (1 Corinthians 10:13).
Footnote: I don’t believe that masturbation is either the unforgiveable sin mentioned in Matthew 12 and Luke 12, or that it constitutes loss of virginity. However, past sexual sins nearly always have implications for future relationships – sowing to the wind reaps the whirlwind (Hosea 8:7). The greater the sexual purity before marriage, the sweeter and more straightforward the marital union tends to be.