He served the Dark-lord at the tower of Barad-dur during the Second-age and with his master, perished after the battle of Gorgoroth. At the end of the first millenium of the Third-age, Khamul re-appeared with Sauron at the tower of Dol-Guldur,and dwelt there with him while Sauron's power grew in secret.
After the Dark-lord's return to Mordor, the Nazgul Lieutenant Khamul and Adunaphel returned to Dol-guldur, where they were to hold in check the power of Lorien. When the final war broke out the nazgul lieutenant Khamul was sent out to search for the Shire, and if possible to locate the One Ring. Khamul and other of the Nazgul tracked the Halflings through the Shire but lost their track as the latter departed through Buckland.
Khamul's origins are veiled in mystery save that he was of one of the races from beyond Rhun in the furthest east of Middle-earth. Like all the ring-wraiths he was bound to Sauron by one of the nine rings of power and his fate was thus tied to that of his master. So when Sauron went into the shadow at the end of the Second-age, Khamul also disappeared from Middle-earth re-appearing with his master after a millennium of the Third-age.