B2 "The Keep on the Borderlands" by Gary Gygax replaced B1 "In Search of the Unknown" in the original Basic Set and was also sold separately. A revised version was included in the 1981 Basic Set, edited by Tom Moldvay.
Illustration by Erol Otus from the back cover to module B2 "The Keep on the Borderlands" (1980) depicting a group of adventurers approaching the Keep, its ramparts lit by the rising sun.
There has been more discussion online concerning module B2 than for module B1 (see the Dragonsfoot index, here). The classic adventure has been the basis of a novelization by Ru Emerson, a long-running webcomic, and a D&D Online video game.
Although various reasons for replacing module B1 have been proposed, the original motivation appears to have been financial. When Mike Carr wouldn't accept a cut in the royalties he was due, Brian Blume asked Gygax to write a replacement module.*
*from an interview in Goodman Games "Into The Borderlands" (2018)
Gygax had just finished writing module T1 "The Village of Hommlet" and completed "The Keep on the Borderlands" in under three weeks. The initial version was written specifically for Holmes Basic, and so included Dexterity scores for the monsters.
The version of module B2 in the 1981 Basic Set was the first module I ever ran. A few years ago, I posted my experience running the earlier version for my son and his friends, (you can check out my campaign journal, complete with tactical illustrations, here).
Much has been written suggesting the American frontier as the ideological framework behind D&D in general, and "The Keep on the Borderlands" in particular, (see comments for this post from Grognardia as far back as 2008, as well as this post from Blog of Holding in 2016).
The Realm of mankind is narrow and constricted. Always the forces of Chaos press upon its borders, seeking to enslave its populace, rape its riches, and steal its treasures. If it were not for a stout few, many in the Realm would indeed fall prey to the evil which surrounds them. Yet, there are always certain exceptional and brave members of humanity, as well as similar individuals among its allies - dwarves, elves, and halflings - who rise above the common level and join battle to stave off the darkness which would otherwise overwhelm the land. Bold adventurers from the Realm set off for the Borderlands to seek their fortune. It is these adventurers who, provided they survive the challenge, carry the battle to the enemy. Such adventurers meet the forces of Chaos in a testing ground where only the fittest will return to relate the tale. Here, these individuals will become skilled in their profession, be it fighter or magic-user, cleric or thief. They will be tried in the fire of combat, those who return, hardened and more fit. True, some few who do survive the process will turn from Law and good and serve the masters of Chaos, but most will remain faithful and ready to fight chaos wherever it threatens to infect the Realm.
from B2 "The Keep on the Borderlands"
(The earlier Chainmail scenario The Battle of Brown Hills was likewise fought between the forces of Law and Chaos, and would serve as a great backstory and source of place names for those wishing to expand upon "The Realm" as a setting.)
When the 1983 Expert Set was released, locations for modules B1-4 and X1-5 were indicated on the map of "The Lands and Environs of the D&D Wilderness". Module B2 was placed in the northeastern part of the Grand Duchy of Karameikos.
Cover to GAZ 1 "The Grand Duchy of Karameikos" (1987), by Aaron Allston. Illustration by Clyde Caldwell.
This lonely, cold fort lies in the Altan Tepes mountains, and the only way to reach the fort is by riverboat. The garrison (Fourth Division, Castellan Guard Battalion, "The Mountain Storm") is supposed to keep an eye on possible invasions from the north and east, and to watch the activities of the frost giants known to live in these wild lands. If you have adventure B2 (The Keep on the Borderland), you can set it here; eliminate the large town the adventure mentions for the area, and leave only the cold and stubborn garrison.
A location in Greyhawk was described in "Return to the Keep on the Borderlands" (1999) by John Rateliff, who had intended the setting to be generic, (resulting in "a nasty shock when Powers That Be slapped a GREYHAWK logo on the back cover.")*
*if one is actually planning to run the module in Greyhawk, check out "Repair to the Keep on the Borderlands" by Russ Taylor, published in Oerth Journal #11 (May, 2000)
Naming the NPCs:
One of the most common criticisms leveled against "The Keep on the Borderlands" is its lack of names for the various NPCs. (I've never understood this, as my players usually refer to NPCs by their occupations as opposed to their names, anyway).
The frequent rebuttal is, of course, that DMs are thereby able to use names evoking their own campaign world, (for which module B2 was originally intended to serve as a starting point). For those who don't want to go to the trouble, I've compiled a list for you.
(Alternately, check out NPCs for the Caves of Chaos D&D Next Playtest)