When their father, Pepin the Short, died, his two sons, Carloman and Charles (not yet called "the Great"), became "joint kings" with equal power. Charles was the elder, and no doubt would have preferred to inherit the entire country. Although they were considered co-equal, they were granted separate geographical areas to see to. Charles got western Aquitaine, Neustria, and the northern parts of Austrasia; Carloman got southern Austrasia, eastern Aquitaine, Septimania, Burgundy, and Swabia bordering Italy.
By marrying Desiderata in 770, Charles made an alliance with King Desiderius of the Lombards; a secondary result is that Charles now had a powerful ally on the other side of Carloman's territory, effectively surrounding his brother's lands. Tension between the two, recorded by Einhard, suggests that they were very close to outright war at the time of Carloman's death in December 771. Charles repudiated Desiderata—a medieval practice by which a husband can declare the marriage annulled—and sent her back to Lombardy. (Another theory of his marriage to Desiderata is that it was arranged by Charles' mother, and he simply did not like her and ended the marriage for strictly personal reasons.)
Desiderata may not have been Charles' first wife. He already had a son, Pippin the Hunchback, from a relationship that may have been with a wife or a concubine. She is known as Himiltrude. References to her disappear starting with his marriage to Desiderata. Einhard called her a concubine, and Paul the Deacon says Pippin's birth was "before legal marriage." A letter from Pope Stephen III, however, prior to the marriage to Desiderata, speaks of Carloman and Charles as both married and urges them not to put away their wives. A grave at the monastery of Nivelles of a 40-year-old woman is believed to be Himiltrude, suggesting that she lived past Charles' marriage in 770. The fact that Pippin was not considered eligible to inherit after Charlemagne's death supports the idea of his illegitimacy.
In the same year that Charles sent Desiderata back to her father, he married Hildegard of the Vinzgau, daughter of Count Gerold of Kraichgau. Gerold possessed lands in Carloman's territory, so this marriage helped create more ties with the lands formerly ruled by his brother. They had several children, one of whom did succeed Charlemagne. I'll continue this tomorrow.