No there is no racism in M-E. Racism nowadays itself is used beyond it's own definition. But no, no racism in M-E.
I'm adding this edit to the post due to the claim that I'm "at odds with the accepted answer" as if that makes what I said wrong.
Let's get our terms correct in the circle of mendacity! To pre-judge another without knowledge is prejudice > the expression of such prejudice is bigotry > & acting on such bigotry is discrimination > and such acceptance is racism. The latter being borne of the former.
There are various nit-pickers out there who have looked for racism in the books and ascribed racism to the author and to the story he wrote. One of the funny ones is that orcs are black people (the race in our society). I'd think orcs represent evil rather than black people even though they are described as black. There are also negative associations with the words swarthy, squint-eyed, brown, black, etc that are used in charges of racism against the characters exhibiting these characteristics in the story. I'll point out really quick how foolish it can get when you go reading something into a thing that's not there. The 16th President of the United States, Abraham Lincoln, in describing himself said that he was "a long black fellow." He described himself again in the following manner:
If any personal description of me is thought desirable, it may be said
that I am, in height, six feet four inches, nearly; lean, weighing an
average one hundred eighty pounds; dark complexion, with coarse black
hair, and dark eyes. [Hannibal Hamlin of Maine: Lincoln's First Vice-president]
A black man if I did not know one!
Squint-eyed may be used in reference to Asians for "race baiters", but truth be told, it also means cross-eyed [see strabismus]. Swart which comes from the German for black did not refer to race but denoted dark skin. The idea of these enemies being evil because they look a certain way also needs to be addressed but before that how about that evil black man Tom Bombadil?
It seemed to grow larger as it lay for a moment on his big
brown-skinned hand. [In the House of Tom Bombadil]
The idea of brown/black = enemy = evil is a bit absurd. Sure there are dark (not necessarily a race of black people) people who are with the enemy, but they're not evil for being dark. The high race of Númenor, the Kings of Men, work with Sauron. This is contrary to the idea that Tolkien portrays only a certain groups as being evil or working for the enemy. Look at what the King's Men were doing:
in that temple, with spilling of blood and torment and great
wickedness, men made sacrifice to Melkor that he should release them
from Death. And most often from among the Faithful they chose their
victims; yet never openly on the charge that they would not worship
Melkor. the Giver of Freedom, rather was cause sought against them
that they hated the King and were his rebels, or that they plotted
against their kin, devising lies and poisons. [Akallabêth]
There is also this:
Sauron gathered to him great strength of his servants out of the east
and the south; and among them were NOT A FEW of the high race of
Númenor. For in the days of the sojourn of Sauron in that land the
hearts of well nigh all its people had been turned towards darkness.
Therefore many of those who sailed east in that time and made
fortresses and dwellings upon the coasts were already bent to his
will, and they served him still gladly in Middle-earth. [Of the
Rings of Power and the Third Age]
Aragorn is said to be "lean, dark, tall" [At the Sign of the Prancing Pony]. Sauron is referred to as black:
And if the west prove mightier than thy Black Master, this curse I lay
upon thee and they folk: [The Passing of the Grey Company]
Also we have those evil black men known as the Black Riders, "The black fellow sat quite still." [A Short Cut to Mushrooms] There is also among many other examples "Black horsemen have passed through Bree." [Strider] haha Lastly, let's not forget those trees that represent black people:
His heart is as rotten as a black Huorn's. [The Voice of Saruman]
One poster to a degree seems to portray Hobbits as victims and says that "Humans tend to show condescension towards hobbits" and yet those very Hobbits, such as poor disdained Frodo says of other humans:
I did not know that any of the Big People were like that. I thought,
well, that they were just big, and rather stupid: kind and stupid like
Butterbur; or stupid and wicked like Bill Ferny. [Many Meetings]
I'm not saying that this makes Frodo a racist, but clearly there is prejudice here as we see in various people throughout. Then we have another poster bring up the point of speciesism because Gandalf referred to the Hobbits as "absurd, helpless, stupid, rediculous". Note Saruman's similar declaration toward one of his own:
"Radagast the Brown!" laughed Saruman, and he no longer concealed his
scorn. "Radagast the Bird-tamer! Radagast the Simple! Radagast the
Fool! Yet he had just the wit to play the part that I set him." [The
Council of Elrond]
There is the racism in our world people assume is something done to blacks. Look around, even with some of the quotes of the posters, when racism is looked at in the real world it's always something that's said to be done to blacks, or some other minority in a white country. These people I never trust. Also there is the idea that slavery = racism. Slavery is not even extinguished and has a long history across milennia. Don't confuse the two. Might a slaveholder be racist? Sure. But might a black man in America like Nat Butler or Anthony Johnson hold black slaves themselves? Sure. Might a white man in America hold white slaves himself? Sure. Might a black slaveholder be racist? Sure. Btw, blacks had white slaves in America too, true story. These are true things that have happened. White slavery existed before and along with black slavery in America. In fact a movement in the South was surging where they were thinking all white laborers should be enslaved. Then again, you have idiots saying the Civil War was to free the blacks, but it was the whites looking out for their own skins. Slavery is NOT racism. Don't get it twisted.
Slavery is the natural and normal condition of the laboring man,
whether white or black. The great evil of Northern free society is,
that it is burdened with a servile class of mechanics and laborers,
unfit for self-government. [Sociology for the South, or The Failure of
Free Society]
The idea of even trying to apply racism to the characters in Tolkien's world does not even make sense because there are things in Tolkien's world that are not applicable to our own. The men of Númenor actually do have characteristics that make them superior to other men in Middle-earth (unlike that false belief in the Third Reich) whereas racism is the false belief that one race has characteristics that make it superior to another race. They don't exist in our world. The Númenóreans came from the Edain, so they share the same descent as many of the men in M-E, but they became better because they were blessed to be so. Longer life and vitality, greater physical abilities. This is clear in those who're not Númenórean. Take for example Éowyn when she meets Faramir:
she looked at him and saw the grave tenderness in his eyes, and yet
knew, for she was bred among men of war, that here was one whom no
Rider of the Mark would outmatch in battle. [RotK, p. 265]
Also the Númenóreans were not particularly averse to mixing with non-Númenóreans. For example after Númenor was destroyed and the Faithful made it to M-E:
There many already dwelt who were in whole or part of Númenórean
blood; but few of them remembered the Elvish speech. [The Return of
the King; Appendix F]
It was only looked down on in the royal house.
it was a thing unheard of before that the heir to the crown, or any
son of the King, should wed one of lesser and alien race. [Appendix A]
I'd say, stop the race baiting. It's unbecoming, nonsensical, and also in this case reading something into a story that's not there.