NOTE: The individual volumes in the 12-volume History of Middle-Earth series are also published in three large 'Parts' in a series inconsistently titled either The Complete History of Middle-earth and The History of Middle-earth
Part 1 contains volumes I-V from the single-volume series. Part 2 contains volumes VI to IX from the single-volume series. Part 3 contains volumes X-XII from the single-volume series.
Which you might buy depends on your taste and how you plan to use the books. Would you rather have three bulky volumes of about 1500 pages each or twelve volumes that are typically 450 pages long?
Collections of an author's work are often confusing, particularly when what the author has created is as complex as Tolkien's writings. Here's an overview of the twelve-volume History of Middle-earth, which was edited by his son Christopher Tolkien. Hopefully, it will help you select which book or books to buy.
Keep something in mind. In the U.S. Houghton Mifflin publishes Tolkien's authorized works in hardback and trade paperback editions, while Ballantine Books publishes them as cheaper mass-market paperbacks. For some reason, Ballantine doesn't always make it clear that some of their titles are part of the same History of Middle-earth series as those published by Houghton Mifflin. If the title is the same, the content is the same. Which you buy depends on your taste in books and finances. I have copies of both.
GROUP ONE, VOLUMES I - V, EARLY TALES
These five volumes deal primarily with Tolkien's writings before the publication of The Hobbit (1937) and The Lord of the Rings (1954-55). In them, Tolkien was struggling as a still unknown author to create his first history of Middle-earth.
Vol 1 & 2, The Book of Lost Tales Part 1 ( 1983) & 2 (1984). The Book of Lost Tales was written during the 1910s and 1920s. Wikipedia describes it this way: "The framework for the book is that a mortal Man visits the Isle of Tol Eressëa where the Elves live. In the earlier versions of the `Lost Tales' this man is named Eriol, of some vague north European origin, but in later versions he becomes Ælfwine, an Englishman of the Middle-ages."
Vol. 3, The Lays of Beleriand (1985). These are collections of poems, many of them incomplete, written between the 1920s and the late 1940s.
Vol 4, The Shaping of Middle-earth (1986). As you might guess by the title, in this book Christopher describes how his father shaped his vision of Middle-earth from the primitive The Book of Lost Tales to early versions of The Silmarillion. This theme is taken up again in volumes 10 and 11.
Vol 5. The Lost Road and Other Writings (1987). Along with other writings this volume includes Tolkien's drafts of a tale about time travel. Wikipedia describes it this way: "The Lost Road itself is a fragmentary beginning of a tale, including a rough structure and several intiguing chunks of narrative, including four entire chapters dealing with modern England and Numenor, from which the entire story as it should have been can be glimpsed. The scheme was of time-travel by means of 'vision' or being mentally inserted into what had been, so as to actually re-experience that which had happened. In this way the tale links first to Saxon England of Alfred the Great, then to the Lombard Alboin of St. Benedict's time, the Baltic Sea in Old Norse days, Ireland at the time of the Tuatha's coming (600 years after the Flood), prehistoric North in the Ice Age, a 'Galdor story' of Third-Age Middle-Earth, and finally the Fall of Gil-Galad, before recounting the prime legend of the Downfall of Numenor/Atlantis and the Bending of the World. It harps on the theme of a 'straight road' into the West, now only in memory because the world is round."
GROUP TWO, VOLUMES VI - IX, LORD OF THE RINGS
If you or the friend you're buying for is primarily interested in the LOTR, then these four volumes are the books to have. Just keep in mind that you'll find in them many unfinished plots that may or may not fit well into LOTR. Tolkien was a perfectionist, always trying to improve plots and fill in details. These are his drafts.
Vol. 6, The Return of the Shadow (The History of The Lord of the Rings v. 1, 1988). Describes the initial stages of writing LOTR and covers the first three-fourths of The Fellowship of the Ring (until the Mines of Moria).
Vol. 7, The Treason of Isengard (The History of The Lord of the Rings, v. 2, 1989). Covers from the Mines of Moria until Gandalf meets Théoden about one-fourth of the way into The Two Towers.
Vol. 8, The War of the Ring (The History of The Lord of the Rings, v. 3, 1990). Continues the tale up to the opening of the Black Gate not quite three-quarters of the way through The Two Towers.
Vol. 9, Sauron Defeated (The History of The Lord of the Rings, v. 4, 1992). Completes the tale and includes an alternate ending in which Sam answers questions from his children. There is also a much shortened version of Vol. 9 called The End of the Third Age, which leaves out material that isn't related to LOTR.
GROUP THREE, VOLUMES X - XI, SILMARILLION
Just as The Hobbit created a public demand for more tales about hobbits, The Lord of the Rings created a demand for more tales about Middle-earth. To meet that demand, Tolkien struggled to reconcile and adapt many of his earlier tales to the historical framework made well-known by his two published works. He never completed those labors, so it was left after his death to his son Christopher to do so in The Silmarillion (1977). If you or a friend is interested in knowing more about The Silmarillion, these two volumes may be of interest.
Vol 10, Morgoth's Ring (The Later Silmarillion, v. 1, 1993). Contains material from earlier (1951 and later) drafts of The Silmarillion. Wikipedia notes that: "The title of this volume comes from a statement from one of the essays: 'Just as Sauron concentrated his power in the One Ring, Morgoth dispersed his power into the very matter of Arda, thus the whole of Middle-earth was Morgoth's Ring.'"
Vol. 11, The War of the Jewels (The Later Silmarillion v. 2, 1994). Addition material about the earlier drafts of The Silmarillion. Includes information about the origin of the Ents and Great Eagles.
GROUP FOUR, VOLUME XII AND INDEX, WRAP-UP
Vol. 12, The People's of Middle-earth (1996). Contains material that did not fit into the other volumes. The most interesting include additional appendices like those at the back of LOTR, essays on the races of Middle-earth, and about 30 pages of a sequel to the LOTR called The New Shadow. It was set a century after the LOTR. Tolkien abandoned the tale as too "sinister and depressing."
The History of Middle-earth Index (2002) is an index of all twelve volumes.
Keep in mind that books in The History of Middle-earth are nothing like reading The Hobbit or The Lord of the Rings. What J. R. R. Tolkien wrote is often fragmentary and unpolished rough drafts, while what Christopher wrote is literary scholarship, concerned more with sources and texts than plots. If you or the friend you are buying for is more interested in understanding LOTR better, you might be happier with a reference works such as:
Places, terms and dates, together all three will give you a richer, deeper understanding of LOTR.
If you're interested in reading books with the same flavor as Tolkien, you might consider reading William Morris, a once well-known writer who influenced Tolkien. For tales like the warriors of Rohan, see his The House of the Wolfings and The Roots of the Mountains. For arduous quest journeys much like Frodo and Sam's quest to be rid of the Ring, read his The Wood Beyond the World and The Well at the World's End. The four tales have been collected into two inexpensive volumes:
I hope this helps you to select wisely based on your own interests. You can save some money by buying collections of The History of Middle-earth in multi-volume sets. You can also save by buying the Ballantine mass-market paperback instead of the Houghton Mifflin trade paperback edition, although the former may have smaller type and you may need to use both hands to keep it open while you read,