I was wondering if masturbation was a sin even if one didn't have any sinful thoughts when he does it. In Leviticus 15:14-15 it says that the person who had a discharged should offer two young pigeons, one for a sin offering and other for a burnt offering. Does this make masturbation a sin?
If what you concluded were true, then women would sin by having their monthly menstruation (Leviticus 15:29-30) and having a baby would be a sin (Leviticus 12:7-8). Even catching a skin disease would be a sin, which by the way is what Leviticus 15:14-15 covers. The emission of semen isn't mentioned until verse 16.
The confusion comes from the concept of uncleanness. Certain things, which we are inclined to see as gross anyway, were declared to be unclean. The rules of uncleanness were to teach Israel to distinguish between the holy and the unholy (Leviticus 11:43-45). In following the rules for uncleanness, Israel learned about the nature of sin. Even though the items called unclean were not sinful in and of themselves, they did serve as a physical illustration of how sin (which you can't see or touch or hear) behaves. Because uncleanness illustrated what sin is like, God required a sin offering before an unclean person became clean again.
There is a sermon outline that talks about this at length. Please read through "Uncleanness" and be sure to read all the passages cited. I think that by the time you complete the study you will have a better idea about what uncleanness is. Then seen the answer to the question "Is Masturbation Unacceptable?" for details about whether the act of masturbating is a sin or not.