Yes, of course there was and is xenophobia in the US. Nobody is denying it. And nobody is denying that there was significant racism up to the 1960s. And of course it is important to research why this has been happening and why it is happening. But I personally think that going in and saying "what's your excuse for this?" is a very tendential approach, and it always feels like the one who asks the question is doing it to satisfy their own feeling of moral superiority.
Racism in America has and has had many different reasons. After the Civil War, many people still felt that the blacks were inferior to them, because they still had the
mentality that the blacks were slaves. They grew up with it, and they were used to seeing blacks on cotton fields doing the dirty work.
Then, many blacks were poor and uneducated, often unemployed, and thus regarded as scum. It was perceived that an unproportionally large amount of blacks were poor, uneducated and unemployed, so many people believed that being stupid and lazy lay in the genes of black people.
Next, the South was devastated by the Civil War, and most people in the South knew the Civil War was led to free the slaves, so they made the blacks responsible for their misery, as a scapegoat.
There are many more reasons for the extreme hatred of white Americans against black ones. There is never
the one reason, but many, in combination. One person may hate blacks for different reasons than another one does. People who have no logical reason to hate black people are often inflicted by the general mood to do so. At the same time, there are numerous examples of people who by all accounts "should" have hated black people, but stood in their defence because they realised how stupid racism is.
Seriously, blacks had more rights and felt freer in e.g. France of Germany compated with the US, in the 50s or 60s.
The reason? There were hardly any blacks in France and Germany in the 50's and 60's, so society didn't need to pinpoint them. The European "blacks" were the Jews prior to 1945.