In however complex a manner this feeling (sympathy) may have originated, as it is one of high importance to all those animals which aid and defend one another, it will have been increased through natural selection for those communities which included the greatest number of sympathetic members would flourish best and rear the greatest number of offspring....
Thus the social instincts, which must have been acquired by man in a very rude state, and probably even by his early apelike progenitors, still give the impulse to some of his best actions; but his actions are in a higher degree determined by the expressed wishes and judgment of his fellow-men, and unfortunately very often by his own strong selfish desires.
Those quotations should be enough to show Darwin's idea of the origin of the social, or moral, feelings. But I shall quote besides Haeckel's comment on Darwin's theory.
Speaking of the "Golden Rule" in his _Confessions of Faith of a Man of Science_, Haeckel says:
In the human family this maxim has always been accepted as self-evident; as ethical instinct it was an inheritance derived from our animal ancestors. It had already found a place among the herds of apes and other social mammals; in a similar manner, but with wider scope, it was already present in the most primitive communities and among the hordes of the least advanced savages. Brotherly love--mutual support, succour, protection, and the like--had already made its appearance among gregarious animals as a social duty; for without it, the continued existence of such societies is impossible. Although at a later period, in the case of man, these moral foundations of society came to be much more highly developed, their oldest prehistoric source, as Darwin has shown, is to be sought in the social instincts of animals. Among the higher vertebrates (dogs, horses, elephants, etc.), the development of social relations and duties is the indispensable condition of their living together in orderly societies. Such societies have for man also been the most important instrument of intellectual and moral progress.
There is a very able article in the March, 1905, issue of the _Nineteenth Century_, by Prince Kropotkin, the author of _Mutual Aid_, on Darwin's theory of the origin of the moral sense, in which the striking suggestion is made that primitive man, besides inheriting from animals the social instinct, also copied from them the first rudiments of tribal union and mutual aid. This notion may be gathered from the following picturesque passages: