No. Masturbation doesn’t really do anything to your testosterone levels.
You might see claims that abstaining from masturbation can increase your testosterone levels, but this myth has been comprehensively busted.
The only thread of evidence that anyone could cling to in support of the idea comes from a small study. It was conducted more than 20 years ago, with 10 healthy heterosexual German men aged 22-29. Researchers measured their testosterone levels in blood samples collected before, during and after masturbation to orgasm while watching pornography. They instructed the men not to participate in any sexual activity for the three weeks in between.
Here’s the graph of average testosterone levels in the men during the first period (shown by the white squares; the error bars show standard error of the mean) or three weeks later, after abstaining from sexual activity (shown by the black squares):

Testosterone levels in the first blood samples collected before masturbation (the 10-minute mark), three weeks apart (i.e. before abstaining from sexual activity or after abstaining for three weeks), were not different. The only reasonable conclusion from this result is that three weeks of abstinence from sexual activity had no effect on testosterone levels.
Where it gets confusing is when you look at testosterone levels during the rest of the one-hour periods. This is during and after the time the men were watching pornography and masturbating. During this period, the men had slightly higher testosterone levels in the period after they had abstained from sexual activity for three weeks. This means that the men’s response to watching pornography and masturbating was slightly different before and after the three weeks of abstinence from sexual activity. The researchers suggest this is most likely because the three-week period of abstinence increased the testosterone response to the anticipation of sexual activity.
The graph of testosterone levels from this experiment helps look at the short-term effect of masturbation. Either with or without abstinence, there is no change in testosterone between the 30-minute time point (when the men were aroused) and 40 minutes (after orgasm) or more. These results are consistent with another more recent study.
The main takeaway
The body’s feedback system that regulates testosterone maintains appropriate levels for sexual, reproductive , and other vital biological functions.
If you’re healthy, your body responds to whatever activity you are (or are not) doing, whether it’s masturbation or anything else.