The sources for his life are primarily the Annales Bertiniani and the Chronica Fontanellensis, while his mother wrote an educational instruction book called the Liber Manualis for him and his brother sometime before February 842.
William was initially sent to the court of his uncle, Theodoric of Autun, who died around 830, and left the child in the charge of Louis the Pious, then reigning emperor.
On 25 June 841, the same day as the Battle of Fontenoy, William petitioned Charles the Bald for investiture of the benefices of his godfather Theodoric in Burgundy.
In that year, William entered Barcelona and Empúries and assumed authority there, "more by cunning and lies than by force of arms," according to the chroniclers.
However, the sudden disappearance of Sunyer I of Empúries and Bera II of Conflent has led some scholars to posit an act of treachery (coup d'état) to secure his claimed inheritance.
Following his successes, William wrote a letter of thanks to Abd al-Rahman, who in turn urged his lords on the Upper March to assist and support the Toulousain count, who again visited the Córdoban court.
Pepin fled in haste and Charles marched to Narbonne, where he named Aleran as count in Barcelona, Empúries, and Roussillon and as Margrave of Septimania.