Tolkien's cosmology is based on a clear dualism between the spiritual and the material world.
While the Ainur, the first-created but immaterial angelic beings, have the "subcreative" power of imagination, the power to create independent life or physical reality is reserved for Eru Ilúvatar (God); this power of (primary) creation is expressed by the concept of a "Secret Fire" or "Flame Imperishable". The term for the material universe is Eä, "the World that Is", as distinguished from the purely idealist pre-figuration of creation in the minds of the Ainur. Eä contains our Earth (and solar system) in a mythical ancient past, of which Middle-earth is the main continent. Eä (Quenya for "let [these things] be!") was the word spoken by Eru Ilúvatar (metaphorically, in the purported Quenya-language account of creation) by which he brought the physical universe into actuality.

Contents

Eru Ilúvatar is the Elvish (Quenya) name of the monotheistic God of creation.
Eru means "The One", or "He that is Alone"[3] and Ilúvatar signifies "Father of All".[4] The names appear in Tolkien's work both in isolation and paired (Eru Ilúvatar).
He first created a group of angelic beings, called in Elvish the Ainur, and these holy spirits were co-actors in the creation of the universe through a holy music and chanting called the "Music of the Ainur", or Ainulindalë in Elvish.

Eru alone can create independent life or reality by giving it the Flame Imperishable. All beings not created directly by Eru (e.g., Dwarves, Ents, Eagles) still need to be accepted by Eru to become more than mere puppets of their creator. Melkor desired the Flame Imperishable and long sought for it in vain, but he could only twist that which had already been given life.[5]

"I am a servant of the Secret Fire, wielder of the flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udûn. Go back to the shadow! You cannot pass."

- Gandalf the Grey, speaking to the Balrog on the Bridge of Khazad-dum in the Mines of Moria, The Fellowship of the Ring.[6]

The "Flame Imperishable" or "Secret Fire" represents the Holy Spirit in Christian theology.[7] It represents the creative activity of Eru, inseparable both from him and from his creation. In the interpretation of Christopher Tolkien, it represents "the mystery of authorship", the author both standing outside of his work and indwelling in it.[8]

The abode of Eru and the Ainur outside of time or the physical universe is also called the "Timeless Halls" (Heaven).
Tolkien made a point of keeping the ultimate fate of the souls of Men and the nature of their mortality open, and unknown to the Elves (who are tied to the physical world for the time of its duration, and Christian eschatology is not applicable to them).
In the tale of Adanel it is suggested that Men return to Eru after death.

The account of the "events" predating creation is not presented from an omniscient perspective but presented as a fictional tradition, purportedly a record of the account given by the Valar to the Elves in Aman, and from there transmitted to Middle-earth, and translated from Valarin at first into Quenya and later into human languages. It is understood that the Valar, who were present at the moment of creation as Ainur, gave an honest account to the Elves, but were constrained by the limitations of language, the description of the "Music" or of the words "spoken" by Eru, or his "Halls" and the secret "Flame" etc. are to be taken as metaphors.

Fëa and hröa are words for "soul" (or "spirit") and "body" of the Children of Ilúvatar, Elves and Men. Their
hröa is made out of the matter of Arda (erma); for this reason hröar are Marred (or, using another expression by Tolkien himself, contain a "Melkor ingredient"[9]).
When an Elf dies, the fëa leaves the hröa, which then "dies". The fëa is summoned to the Halls of Mandos, where it is judged; however as with death their free-will is not taken away, they could refuse the summons.[10] If allowed by Mandos, the fëa may be re-embodied into a new body that is identical to the previous hröa. (In earlier versions of the legendarium it may also re-enter the incarnate world through child-birth.)[11]
The situation of Men is different: a Mannish fëa is only a visitor to Arda, and when the hröa dies, the fëa, after a brief stay in Mandos, leaves Arda completely. Originally men could "surrender themselves: die of free will, and even of desire, in estel"[12] but Melkor made Men fear death, instead of accept with joy the Gift of Eru.

In The Lord of the Rings Tolkien justifies the nature of the Ring by explaining that Elves and other immortal beings dwell in "both worlds" at once (the physical and the spiritual, or Unseen world) and have great power in both, especially those who have dwelt in the light of the Two Trees before the Sun and Moon; and that the powers associated with "magic" were spiritual in nature.[13][14] Mortals on the other hand are chained to their bodies, have less influence upon them, and their fëa depart the world without them. This posed a problem for immortal beings whose spirits do not wane over time, but become increasingly dependent on their physical bodies.

The Elves who stayed in Middle-earth where Melkor once was dominant, being in bodies and surrounded by things that are themselves Marred and subject to decay by the influence of Melkor, created the Elven Rings out of a desire to preserve the physical world unchanged; as it were in the Undying Lands of Valinor, home of the Valar. Without the rings they are destined to eventually "fade", eventually becoming shadows in the physical world, prefiguring the concept of Elves as dwelling in a separate and often-underground (or overseas) plane in historical European mythology.[15] Mortals who wear a Ring of Power are destined to "fade" much more rapidly, as the rings unnaturally preserve their life-span turning them into wraiths. Invisibility is a side-effect of this, as the wearer is temporarily pulled into the spirit-world.[16][17] Immortal beings, however, became trapped in their bodies over long periods of time, subject to reincarnation only if their bodies were destroyed.

Peter Hastings, manager of the Newman Bookshop (a Catholic bookshop in Oxford), had written to Tolkien (himself a Catholic) objecting to his description of the reincarnation as applicable to the Elves:

God has not used that device in any of the creations of which we have knowledge, and it seems to me to be stepping beyond the position of a sub-creator to produce it as an actual working thing, because a sub-creator, when dealing with the relations between creator and created, should use those channels which he knows the creator to have used already.

In a 1954 draft of a reply to Hastings, Tolkien defended his creative ideas as an exploration of the infinite "potential variety" of God: that it need not conform to the reality of our world so long as it does not misrepresent the essential nature of the divine:

We differ entirely about the nature of the relation of sub-creation to Creation. I should have said that liberation "from the channels the creator is known to have used already" is the fundamental function of "sub-creation", a tribute to the infinity of His potential variety ... I am not a metaphysician; but I should have thought it a curious metaphysic—there is not one but many, indeed potentially innumerable ones—that declared the channels known (in such a finite corner as we have any inkling of) to have been used, are the only possible ones, or efficacious, or possibly acceptable to and by Him![18]

Tolkien used the first part of The Silmarillion, the creation account, to describe his thoughts on the origin of evil in his fictional world, which he took pains to comport with his own beliefs on the subject, as accounted in Tolkien's Letters. These beliefs were elaborated on both early and late in life, and Tolkien sought to bring them consistently in line with his views on evil in the real world; in contrast to widespread critical reception of Tolkien's works as somehow depicting, or even fondly imagining, a binary clash between absolutegood and evil.

In Tolkien's legendarium, evil represents a rebellion against the creative process set in motion by Eru. Evil is defined by its original actor, Melkor, a Luciferian figure who falls from grace in active rebellion against Eru, out of a desire to create and control things of his own that do not comport with the harmonies of the other angelic beings. As it originates with Melkor, whose ideas and conceptions are subservient to the will of Eru, his evil by definition constitutes a relative absence of good, in the Augustinian tradition, rather than an opposing force to the will of God in the Manichaean tradition. Eru explicitly denies Melkor's desire to be a demiurge, and his actions in defiance of the creative will of Eru are marked as evil in that sense; Tolkien rejected Gnosticism of the sort depicted in the mythopoeia of William Blake.

The "good" angels led by Melkor's "brother" Manwë are inspired directly by Eru's teachings, and seek to carry out his wishes directly, but lacking themselves the ability to create things not inspired by Eru, they do not necessarily understand the nature of evil; Manwë subsequently releases Melkor from imprisonment, seeking his redemption, as he is incapable of fully understanding Melkor's hatred. However, Eru takes one of the Ainur aside (Ulmo, the Vala of water) and shows him a vision of snow, ice and rain; things which Ulmo had not envisioned, which were made possible by the extremes of heat and cold imagined by Melkor. Thus, in describing the new Creation, Eru tells Melkor and the others that:

... no theme may be played that hath not its uttermost source in me, nor can any alter the music in my despite. For he that attempteth this shall prove but mine instrument in the devising of things more wonderful, which he himself hath not imagined. [...] and each of you shall find contained [in the design of creation] all those things which it may seem that [you yourself] devised or added. And thou, Melkor, wilt discover all the secret thoughts of thy mind, [and] perceive that they are but a part of the whole and tributary to its glory.[19]

... when the messengers declared to Manwë the [words] of Fëanor... Manwë wept and bowed his head. But at that last word of Fëanor: that at the [very] least the Noldor [would] do deeds to live in song for ever, he raised his head, as one that hears a voice far off, and he said: ‘So shall it be! Dear-bought those songs shall be accounted, and yet shall be well-bought. For the price could be no other. Thus even as Eru spoke to us shall beauty not before conceived be brought into Eä, and evil yet be good to have been.’[20]

This leads Melkor to envy the resulting creation and seek to destroy it, becoming the ultimate nihilist. Tolkien explains that Melkor would not be satisfied with control, for the very matter of creation would remain the vision of Eru, and thus, evil could not have the mastery in the end, even if the world were destroyed.[21] Evil in Tolkien's world is thus, in and of itself, incapable of creative impulse:

Evil is fissiparous. But itself barren. Melkor could not 'beget'.... Out of the discords of the Music—sc. not directly out of either of the themes, Eru's or Melkor's, but of their dissonance with regard one to another—evil things appeared in Arda, which did not descend from any direct plan or vision of Melkor: they were not 'his children'; and therefore, since all evil hates, hated him too.[22]

However, Tolkien also emphasized that all beings with free will would be subject to a similar fall, due to being given the choice to reject the will of Eru or embrace the harmony of creation. In Morgoth's Ring and in his notes written late in life, Tolkien spent much time on issues of cosmology and theology within the fictional universe, and described how Melkor, as the original evil, represented the only "pure" evil in the story; all other beings were redeemable provided free will, and even Melkor himself was not evil in origin, being the creation of the fundamentally good supreme being. In an effort to subvert creation, Tolkien describes in these notes how Melkor poured his spiritual essence into the very fabric of matter, such that all of Middle-earth was the equivalent of Sauron's ring for Melkor, hence the title of the volume.[23]

Eä (Quenya: [ea]) is the Quenya name for the universe as a realization of the vision of the Ainur. The word comes from the Quenya word for to be. Thus, Eä is the World that Is, as distinguished from the World that Is Not. It may thus be assumed that everything outside Eä, including the Timeless Halls, has no material form. The Ainur, angelic beings from the Timeless Halls beyond Eä, refer to it as "the Little Kingdom", because all creation that humans can perceive is tiny in comparison to the mind of Eru Ilúvatar (God). Eä was the word spoken by Eru Ilúvatar by which he brought the universe into actuality.

Ilúvatar created Arda (Earth) according to a flat Earth cosmology. This disc-like Arda has continents and the seas, and the moon and the stars revolve around it. Arda was created to be the "Habitation" (Imbar or Ambar) for the Children of Ilúvatar (Elves and Men).

This world was, at first, not lit by a sun. Instead, the Valar created two lamps to illuminate it: Illuin ('Sky-blue') and Ormal ('High-gold'). To support the lamps, the Vala Aulë forged two enormous pillars of rock: Helcar in the north of the continent Middle-earth, and Ringil in the south. Illuin was set[by whom?] upon Helcar and Ormal upon Ringil. Between the columns, where the light of the lamps mingled, the Valar dwelt on the island of Almaren in the midst of a Great Lake.

When Melkor destroyed the Lamps, two vast inland seas (Helcar and Ringil) and two major seas (Belegaer and the Eastern Sea) were created,[by whom?] but Almaren and its lake were destroyed.

The Valar left Middle-earth, and went to the newly formed continent of Aman in the west, where they created their home called Valinor. To discourage Melkor from assailing Aman, they thrust the continent of Middle-earth to the east, thus widening Belegaer at its middle, and raising five major mountain ranges in Middle-earth: the Blue, Red, Grey, and Yellow Mountains, plus the Mountains of the Wind. This act disrupted the symmetrical shapes of the continents and seas.

Vaiya (also known as Ekkaia, the Enfolding Ocean, and the Encircling Sea) is a dark sea that surrounds the world before the cataclysm at the end of the Second Age. During this flat-Earth period, Vaiya flows completely around Arda, which floats on it like a ship on a sea. Above Vaiya is a layer of atmosphere.

Ulmo the Lord of Waters dwells in Vaiya, underneath Arda. Vaiya is extremely cold; where its waters meet the waters of the ocean Belegaer on the northwest of Middle-earth, a chasm of ice is formed: the Helcaraxë.

Ilmen is a region of clean air pervaded by light, before the cataclysm at the end of the Second Age. The stars and other celestial bodies are in this region. The Moon passes through Ilmen on its way around the world, plunging down the Chasm of Ilmen on its return.

Tolkien likely derived the name Ilmen from ilma, the Finnish word for air.

Tolkien's legendarium addresses the spherical Earth paradigm by depicting a catastrophic transition from a flat to a spherical world, in which Aman was removed "from the circles of the world".

This transition from a flat to a spherical Earth is at the center of Tolkien's "Atlantis" legend.
His unfinished The Lost Road suggests a sketch of the idea of historical continuity connecting the Elvish mythology of the First Age with the classical Atlantis myth, the Germanic migrations, Anglo-Saxon England and the modern period, presenting the Atlantis legend in Plato and other deluge myths as a "confused" account of the story of Númenor. The cataclysmic re-shaping of the world would have left its imprint on the cultural memory and collective unconscious of humanity, and even on the genetic memory of individuals. The "Atlantis" part of the legendarium explores the theme of the memory of a 'straight road' into the West, which now only exists in memory or myth, because the physical world has been changed.

The Akallabêth says that the Númenóreans who survived the catastrophe sailed as far west as they could in search of their ancient home, but their travels only brought them around the world back to their starting points. Hence, before the end of the Second Age, the transition from "flat Earth" to "round Earth" had been completed. New lands were also created in the west, analogous to the New World. The same idea is expressed in The Lost Road, via an alliterating line in Primitive Germanic is revealed to one protagonist, Westra lage wegas rehtas, nu isti sa wraithas "Westward lay a straight way, but now it is bent."[28]
The same sentence is recorded in Adûnaic, the original language of "Atlantis" revealed to one of the protagonists in The Notion Club Papers (written 1945), reading adûn izindi batân tâidô ayadda: îdô kâtha batîna lôkhî; this is glossed (by the character who experienced the vision, within the fictional narrative, as: "west / [a] straight / road / once / went / now / all / roads / [are] crooked").[29]

Concurrent with early versions of the mythology Tolkien developed a list of names and meanings called the Qenya Lexicon. Christopher Tolkien included extracts from this in an appendix to The Book of Lost Tales, including mentions of specific stars, planets, and constellations in the entries: Gong, Ingil, Mornië, Morwinyon, Nielluin, Silindrin, and Telimektar.[31]
In the introductory text for the index of Morgoth's Ring Christopher Tolkien notes several names which his father identified as planets, but speculates that this may have been passing thoughts rather than definitive conclusions.

Eärendil's Star, "Gil-Amdir",[38] "Gil-Estel",[39] "Gil-Oresetel", and "Gil-Orrain"[40] – The light of a Silmaril, set on Eärendil's ship Vingilot, represents the planet Venus. The English use of the word "earendel" in the Old English poem Crist I was found by 19th century philologists to be some sort of bright star, and from 1914 Tolkien understood this to mean the morning-star and he also gave the word a capital letter to make it a name. The line éala éarendel engla beorhtast "Hail, Earendel, brightest of angels" was thus Tolkien's inspiration for this part of the legendarium. The Old English phrase is rendered in Quenya as Aiya Eärendil, elenion ancalima! "Hail Eärendil, brightest of stars!".

Menelvagor, Daimord,[46] Menelmacar, Mordo,[47] Swordsman of the Sky, Taimavar, Taimondo, Telimbektar, Telimektar, Telumehtar (Orion)[48]—A constellation meant to represent Túrin Turambar and his eventual return to defeat Melkor in The Last Battle. Menelmacar superseded the older form, Telumehtar (which nonetheless continued in use), and was itself adopted into Sindarin as Menelvagor.

Valacirca, the Sickle of the Valar,[52] Burning Briar,[53]Durin's Crown,[54] Edegil,[55] Otselen, the Plough, Seven Stars,[56] Seven Butterflies,[57] Silver Sickle, Timbridhil,[58] (Ursa Major / Big Dipper)[59]—An important constellation of seven stars set in the sky by Varda as an enduring warning to Melkor and his servants, and which precipitated the Awakening of the Elves. It also formed the symbol of Durin, seen on the doors of Moria, and inspired a song of defiance from Beren. According to The Silmarillion it was set in the Northern Sky as a sign of doom for Melkor and a sign of hope for the Elves. The Valacirca is one of the few constellations named in the book, another significant one being Menelmacar.

^"Actually in the imagination of this story we are now living on a physically round Earth. But the whole 'legendarium' contains a transition from a flat world ... to a globe ...." (Letter written in 1954), Letters, #154

^"... my legendarium, especially the 'Downfall of Númenor' which lies immediately behind The Lord of the Rings, is based on my view: that Men are essentially mortal and must not try to become 'immortal' in the flesh." (Letter written in 1954), Letters, #153.

^Clyde S. Kilby. Tolkien & The Silmarillion. Harold Shaw, 1976, p. 59.
"Tolkien admitted to Clyde Kilby in the summer of 1966 that this was the Holy Spirit. The nature of the Second Person of the Trinity, the Logos, appears ony in the abstract in the story 'Athrabeth Finrod Ah Andreth' [...] anticipat[ing] the Incarnation. 'They say that the One will enter himself into Arda, and heal Men and all the Marring from the beginning to the end'". Bradley J. Birzer, "Eru" in Drout (ed.), J.R.R. Tolkien Encyclopedia, 2007, p. 171.

^Matthew Dickerson, "The and Hröa and Fëa of Middle-Earth" in Vaccaro (ed.), The Body in Tolkien's Legendarium: Essays on Middle-earth Corporeality, McFarland, 2013, p. 78.

^"The Mirror of Galadriel". ibid. Book II Ch. 7. yet if you succeed, then our power is diminished, and Lothlórien will fade, and the tides of Time will sweep it away. We must depart into the West, or dwindle to a rustic folk of dell and cave, slowly to forget and to be forgotten.

^"The Shadow of The Past". ibid. if [a mortal] often uses the Ring to make himself invisible, he fades: he becomes in the end invisible permanently, and walks in the twilight under the eye of the dark power that rules the Rings.

^"Many Meetings". ibid. You were in gravest peril while you wore the Ring, for then you were half in the wraith-world yourself.

^Tolkien, J.R.R. "I. Notes on Motives in the Silmarillion". History of Middle Earth X: Morgoth's Ring. This was sheer nihilism, and negation its one ultimate object: Morgoth would no doubt, if he had been victorious, have ultimately destroyed even his own 'creatures', such as the Orcs, when they had served his sole purpose in using them: the destruction of Elves and Men. Melkor's final impotence and despair lay in this: that whereas the Valar ... could still love Arda Marred', that is Arda with a Melkor-ingredient, and could still heal this or that hurt, or produce from its very marring, from its state as it was, things beautiful and lovely, Melkor could do nothing with Arda, which was not from his own mind and was interwoven with the work and thoughts of others: even left alone he could only have gone raging on till all was levelled again into a formless chaos. And yet even so he would have been defeated, because it would still have 'existed', independent of his own mind, and a world in potential.

^Larsen, Kristine (2005). "A Definitive Identification of Tolkien's 'Borgil': An Astronomical and Literary Approach". Tolkien Studies. West Virginia University Press. 2: 161–170. doi:10.1353/tks.2005.0023. In The Fellowship of the Ring, 'Three is Company' Tolkien indicates that Borgil is a red star which appears over the horizon after Remmirath (Pleiades) and before Menelvagor (Orion). Larsen and others note that Aldebaran is known as 'the follower' of the Pleiades and is the only major red star to fit the description.

^"Qenya Lexicon". Parma-Eldalamberon. 12. The twelfth volume of the linguistic journal Parma Eldalamberon published the complete text of Tolkien's Qenya Lexicon, including star names listed in entries that were not included in the Book of Lost Tales appendix. These additional entries can be found on pages 35, 43, 63, and 82