When he set out for Makkah to perform Umrah during the time of civil strife, he said, "If I am prevented from reaching the House, we will do as we did with the Messenger of Allah ﷺ." So he entered the state of ihram for Umrah, because the Messenger of Allah ﷺ had entered ihram for Umrah in the year of Hudaybiyyah.Then Abdullah reflected on his situation and said, "The matter of the two is one and the same."He then turned to his companions and said, "The matter of the two is one and the same. I call you to witness that I have made Hajj obligatory upon myself along with the Umrah."He then proceeded until he reached the House, performed a single tawaf, considered that sufficient for both, and offered a sacrificial animal.
حين خرج إلى مكة معتمرا في الفتنة: إن صددت عن البيت صنعنا كما صنعنا مع رسول الله ﷺ فأهل بعمرة من أجل أن رسول الله ﷺ أهل بعمرة عام الحديبية، ثم إن عبد الله نظر في أمره فقال: ما أمرهما إلا واحد، ثم التقت إلى أصحابه فقال: ما أمرهما إلا واحد، أشهدكم أني قد أوجبت الحج مع العمرة، ثم نفذ حتى جاء البيت فطاف طوافا واحدا ورأى ذلك مجزيا عنه وأهدى.
Malik narrated it in Muwatta (99) from Nafi, from Abdullah bin Umar, with this wording.Bukhari narrated it in the chapter on the one who is prevented [from completing Hajj] (1806), and Muslim in Hajj (1230), both of them through Malik, with this wording, similarly.