Al-Baji worked at various times as a watchman and a goldsmith to support himself. He performed pilgrimage four times and lived austerely in the pursuit of knowledge: in Mecca for three years with Abu Dharr al-Harawi, then Baghdad for three, where he accompanied Abu al-Tayyib al-Tabari and Abu Ishaq al-Shirazi, then Mosul where he studied under Abu Ja`far al-Samnani and Ibn al-Baqillani. His wealth increased greatly after he returned to Andalusia and became its chief scholar and teacher. The Qadi Abu `Ali ibn Sakra said: “I never saw his like; nor anything like his appearance, his majesty, and the dignity of his gatherings. He is one of the imams of the Muslims.”

After al-Baji came to Andalusia he went to Majorca where he defeated Ibn Hazm in debate according to Ibn Bassam. Ibn Hazm reportedly said: “If the Malikis had only `Abd al-Wahhab [ibn `Ali ibn Nasr al-Baghdadi] and al-Baji, it would suffice them.”

Among al-Baji’s books: Al-Tasdid ila Ma`rifa al-Tawhid, Sunan al-Minhaj, Tartib al-Hajj,Ihkam al-Fusul fi Ahkam al-Usul, al-Ta`dil wa al-Tajrih li man Kharraja `anhu al-Bukhari fi al-Sahih, Sharh al-Muwatta’ in two versions: al-Istifa’ and its abridgment al-Muntaqa – named by the author of Shajara al-Nur “the best book ever written in Malik’s school” – al-Imla’ – a shorter version of the latter – Mukhtasar al-Mukhtasar fi Masa’il al-Mudawwana, and Sunan al-Salihin. In al-Muntaqa he states, in explanation of the hadith of Allah’s descent to the nearest heaven in the last third of the night:1

The Prophet’s — Allah bless and greet him — saying that our Exalted Lord descends every night to the nearest heaven is to inform us that supplication at that particular time is answered, petitioners are given what they request, and those who ask for forgiveness are forgiven. It warns us as to the great merit of that time and strongly encourages us to make abundant supplication, petition, and contrition at that time. It was narrated from the Prophet — Allah bless and greet him — in similar terms that Allah Almighty and Exalted said: “If My servant comes near Me one hand-span I come near him one cubit. If he comes near Me one cubit I come near him an arm’s length. If he comes to Me walking, I come to him running.”2He did not mean by this hadith a coming-near in terms of distance, for such is impossible and inexistent. All he meant was the servant’s coming-near in terms of good works, and Allah’s coming-near in terms of answer and acceptance. In the same sense one says “So-and-so is near So-and-so,” and they say of the leader “He is near his people” if he helps them a lot and welcomes them. This is well-known in the language of the Arabs.3

In his book Tahqiq al-Madhhab, he replies to those who attacked him for representing that the Prophet — Allah bless and greet him — could write on the literal basis of the hadith of al-Bara': “Allah’s Messenger — Allah bless and greet him — took the treaty – he did not excel at writing – and wrote…”4