Francis Galton, the cousin of Charles Darwin, invented the word 'eugenics' and wrote several articles and books about how to improve the English population, or the English "race" as he called it.
Galton's vocabulary may appear ill-chosen for a modern taste; and therefore I will here attempt to figure out, what Galton actually meant.
This exposition is based on Galton's book Inquiries into Human Faculty and Its Development.
In the chapter "Variety of Human Nature", Galton writes:
The instincts and faculties of different men and races differ in a variety of ways almost as profoundly as those of animals in different cages of the Zoological Gardens; and however diverse and antagonistic they are, each may be good of its kind. It is obviously so in brutes; the monkey may have a horror at the sight of a snake, and a repugnance to its ways, but a snake is just as perfect an animal as a monkey.
In other words, translating to relations between humans, even if humans of one race (such as the English) might find the ways of another race repugnant, this does not imply a difference in quality, only that they are different. So already here we could dismiss the claim that Galton was a racist in the standard meaning of the word. But let us continue the investigation.
The living world does not consist of a repetition of similar elements, but of an endless variety of them, that have grown, body and soul, through selective influences into close adaptation to their contemporaries, and to the physical circumstances of the localities they inhabit.
This is a tip with the hat to cousin Charles. In particular should be noted the phrase "repetition of similar elements". This refers to creationists of the Platonistic variety. These conjectured that the Creator had used a finite number of elements, each kind being composed of a certain subset of these elements. Some ID proponents today operate with a similar idea.
Back to Galton:
The moral and intellectual wealth of a nation largely consists in the multifarious variety of the gifts of the men who compose it, and it would be the very reverse of improvement to make all its members assimilate to a common type.
That is, Galton was certainly not into making a stereotyped "master" race.
However, in every race of domesticated animals, and especially in the rapidly-changing race of man, there are elements, some ancestral and others the result of degeneration, that are of little or no value, or are positively harmful. We may, of course, be mistaken about some few of these, and shall find in our fuller knowledge that they subserve the public good in some indirect manner; but, notwithstanding this possibility, we are justified in roundly asserting that the natural characteristics of every human race admit of large improvement in many directions easy to specify.
Note the inconsistent use of the word "race" here. First humans are considered one race, and later more than one race. A genuine racist would have been more consistent in applications of this keyword. Notice also that Galton suggests that "natural characteristics of every human race admit of large improvement[s]". The English are not perfect. A key feature is here the "natural characteristics". The way Galton sees things, each "race", that is, nationality, has certain characteristics resulting from adaptation. No indication that any nationality is superior to any other outside its habitat.
In the chapter "Selection and Race", Galton writes:
So long as the race remains radically the same, the stringent selection of the best specimens to rear and breed from, can never lead to any permanent result. The attempt to raise the standard of such a race is like the labour of Sisyphus in rolling his stone uphill; let the effort be relaxed for a moment, and the stone will roll back. Whenever a new typical centre appears, it is as though there was a facet upon the lower surface of the stone, on which it is capable of resting without rolling back. It affords a temporary sticking-point in the forward progress of evolution. The causes that check the unlimited improvement of highly-bred animals, so long as the race remains unchanged, are many and absolute.
In other words, improvement of a race requires an improvement of the entire race, selective breeding is not sufficient. Also notice the use of the word "evolution" in the meaning "improvement" rather than "adaptation". It is not based on natural selection, but rather on, what happens to be considered as desirable, and what is considered desirable may of course vary among nationalities.
Back to Galton:
In the first place there is an increasing delicacy of constitution; the growing fineness of limb and structure end, after a few generations, in fragility.
And from the next paragraph:
The next difficulty lies in the diminished fertility of highly-bred animals. It is not improbable that its cause is of the same character as that of the delicacy of their constitution.
Again, the point of these two factors is that selective breeding cannot on its own lead to a stable improvement.
Concluding, Galton writes:
Whenever a low race is preserved under conditions of life that exact a high level of efficiency, it must be subjected to rigorous selection. The few best specimens of that race can alone be allowed to become parents, and not many of their descendants can be allowed to live.
A "low" race here, of course, is relative to the conditions, not an absolute term.
On the other hand, if a higher race be substituted for the low one, all this terrible misery disappears. The most merciful form of what I ventured to call "eugenics" would consist in watching for the indications of superior strains or races, and in so favouring them that their progeny shall outnumber and gradually replace that of the old one.
That is, Galton does not suggest that "inferior" people should be disallowed from marriage, merely that "superior" people should be favored; that is, encouraged to marry and have children. And again, remember that "inferior" and "superior" are not absolutes.
Ending this paragraph, Galton writes:
Such strains are of no infrequent occurrence. It is easy to specify families who are characterised by strong resemblances, and whose features and character are usually prepotent over those of their wives or husbands in their joint offspring, and who are at the same time as prolific as the average of their class. These strains can be conveniently studied in the families of exiles, which, for obvious reasons, are easy to trace in their various branches.
Exiles are emigrants, and emigrants are immigrants, so it's not as if Galton is completely against foreigners.
This is even more clear in the following paragraph:
The debt that most countries owe to the race of men whom they received from one another as immigrants, whether leaving their native country of their own free will, or as exiles on political or religious grounds, has been often pointed out, and may, I think, be accounted for as follows:--The fact of a man leaving his compatriots, or so irritating them that they compel him to go, is fair evidence that either he or they, or both, feel that his character is alien to theirs. Exiles are also on the whole men of considerable force of character; a quiet man would endure and succumb, he would not have energy to transplant himself or to become so conspicuous as to be an object of general attack. We may justly infer from this, that exiles are on the whole men of exceptional and energetic natures, and it is especially from such men as these that new strains of race are likely to proceed.
Remember that this was written in the age of free enterprise, where people of "exceptional and energetic natures" were particularly in demand.
In short, Galton is not into keeping the English race pure, rather he acknowledges that immigrants are of great value to the society.
The very next chapter, "Influence of Man upon Race" begins with this wonderful paragraph:
The influence of man upon the nature of his own race has already been very large, but it has not been intelligently directed, and has in many instances done great harm. Its action has been by invasions and migration of races, by war and massacre, by wholesale deportation of population, by emigration, and by many social customs which have a silent but widespread effect.
The influence of man upon the nature of his own race has not been INTELLIGENTLY DIRECTED!!!
Please read that sentence a couple of times - until you understand that eugenics is not "Darwinism", but "Intelligent Design".
All in all, Francis Galton is in no way suggesting any drastic measures for the improvement of races, nor any absoluteness in comparison between races, nor that racial mixture is in itself the root of all evil.
That is to say that the Nazi version of eugenics can hardly be said to have been a direct application of Galton's suggestions.
For an alternate view, se Richard Weikart's article Father of Eugenics.