The teaching of 'no self' is not just an interesting piece of Buddhist philosophy, but a vital necessity for Buddhist salvation. It is the belief in ourselves as separate selves that leads us to wrongly distinguish between one another. It makes us seek our own good rather than other peoples. This is all ignorance of the true nature of existence. Complete loss of this delusion of 'self' is equivalent to enlightenment. This teaching of 'no self', to the Buddhists is known as Anatta.
Around the same time as the Buddha, The Shramanas taught 'self' was a real part of the person. This 'real' part of the person was known as a soul or 'atman'. This atman would reincarnate in a different body after death, and could never completely die. Shramanas would meditate with the idea that the atman would be freed from the body, which imprisoned it. The Buddha rejects absolutely all of this.
These were common ideas at the time that he would often be in debate about. He taught that believing in a soul was dangerous and would lead to selfishness.
The Buddha must have had reasons for not believing there was any eternal 'self'. While exploring in thought he saw dependent co-origination, nothing is independent and everything is dependent on something else for its own existence. The Buddha saw that no part of the 'self' is constant and unchanging so there could be no 'soul' or 'atman' that the rest of the 'self' is dependent on. The Buddha believed if there was a 'self', surely it could be found in meditation, but he did not. All he saw was his mind, thoughts, and feelings. Even when he awakened at the point of enlightenment he saw no 'self'. The Buddhist Scriptures say: "He found nothing substantial in...