KhanKhan is a title meaning roughly emperor or ruler in Mongolian (and also Turkish).
This title was first used by Rouran. Maybe the Xianbei used it earlier. At that time it was pronounced as Khaghan. The gh sound weakened. As the result of its disappearance Khaghan is Khaan in Modern Mongolian.
The Secret History of the Mongols clearly distinguishes Khaghan and Khan. Only Genghis and his descendants are called Khaghan and other rulers are referred to as Khan.