Charlemagne (or Charles the Great) was King of the Franks from 768, when his father Pepin the Short died. Pepin, the son of Charles Martel, who had defeated the Muslims at Tours in 732, had been Mayor of the Palace (sort of a Prime Minister) to Childeric III, the last Merovingian king, from 741. Pepin ousted Childeric in 751, and proved an able ruler. When he died he left the throne to his sons Charles and Carloman, but the latter died in 771. Charles proved an extremely able king, earning the title "Le Magne" (the great), which was grafted onto his name.
Charlemagne spent much of his reign at war, unifying the miscellaneous kingdoms and duchies of what are now France and Germany, capturing lands from the Slavs in the east, beating back the Muslims in Spain, and curbing the Lombards in Italy. He systematized the administration of his empire, creating duchies and counties, organized learning, promoted industrial development (he even figured out how to grow wine grapes in the Rhineland!), and meanwhile found time to learn to read as an adult.
On Christmas Day in 800 the Pope, Leo III (later proclaimed a saint), crowned the unsuspecting Frank "Roman Emperor," as a reward for aiding the papacy against the Lombards. Charlemagne, a widower, was apparently not thrilled by this development, as he may have been in the throes of negotiating a marriage with the Byzantine Empress Irene, a widow. This would have brought him the imperial dignity without the danger of papal interference. Had Charlemagne brought off this marriage it would have brought forth one of the great "what ifs" of history.
Upon his death Charlemagne left his empire to his son Louis the Pious (Louis I of France). Louis mismanged things a bit, but his worst decision was to divide the empire among his three sons upon his death, thereby destroying the incipient unity of Western Christendom until the 20th century.
After his death Charlemage became the center of a complex cycle of myths and legends rivalled only by the tales surrounding King Arthur .