In fact, in Hulagu's view, he was the most qualified to obtain the Khan position. Therefore, as soon as he heard that Möngke died in battle on the battlefield of the Southern Song Dynasty, he was preparing to attack Africa, but he did not fight, and immediately withdrew his troops and rushed back to the Mongolian mainland.
Why did Hulagu consider him the most qualified to be a Khan?

(Hulagu)
Because of the succession of the Mongol Khan's throne, although there are three theories: "the young son shouzao", "the will of the Great Khan", and "the supremacy of military merit". But in fact, the "young son Shouzao" was never executed in the process of Khan succession. (This statement has never been enforced, but it has been generalized in a variety of texts.) I think it's quite possible that this is an ancestral tradition of the Mongol Empire, or a way of implementing it more among the Mongol populace.)
The "Will of the Great Khan", except for the death of Genghis Khan, the succession of Wokoutai was inherited in this way, and later it was not adopted in this way.
"Battle merit is supreme", which is actually the most important consideration for the succession of the Khan's throne. However, in practical application, "the supremacy of battle merit" has become "the supremacy of force".
For example, when Wokoutai died, Brother Timmu, the younger uncle of Wokoutai (Genghis Khan's younger brother), had raised troops to fight for the Khan's position, and was already close to Hala and Lin, but because Guiyu had returned from the Caucasus front with his army and was already about to reach Hala and Lin, Temugo was afraid and had to lead the troops back.
For another example, in the process of Möngke's succession to the Khan's throne, there are more obvious characteristics of "the supremacy of force". Originally, the Khan's position could not be turned by Möngke, after all, Möngke was a member of the Tore clan, and Genghis Khan had already said that the Khan's position would be passed on to the descendants of Wokoutai. However, because Battus presided over the meeting, and Battus threatened with powerful force as a backing, no one dared not listen to him at the Kuritai Conference, and in the end everyone had to choose Möngke.
Moreover, after Möngke succeeded to the throne, in order to consolidate the Khan's throne, he carried out a large-scale purge of the descendants of the Wokoutai clan and divided and transferred their fiefs. This is clearly the result of armed intervention.
(Kuritai Conference)
When Möngke died in battle, Hulagu considered him the most qualified to inherit the Khan's throne. It is because: first, he has the greatest achievements in battle; second, his force is the strongest.
First of all, let's say "the greatest achievements in battle." Among Möngke's brothers and sons, the younger brother Ali Bu brother and Möngke's sons did not lead troops to fight and did not have military achievements. Kublai Khan's military exploits were mainly reflected in the destruction of Dali. However, he did not fight smoothly on the battlefield of the Southern Song Dynasty, attacking Ezhou for several months, but he never took it down. It can be said that he worked the battlefield of the Southern Song Dynasty to no avail. Hulagu, on the other hand, took almost all of Western Asia (except for the Arabian Peninsula, which at that time was still barren). This battle achievement is definitely the largest among the brothers.
Let's talk about "the strongest force.". Ali Buge had an army in his hands, which consisted mainly of troops stationed in Mongolia itself, as well as the army that retreated from the southern Song Dynasty after Möngke's death, but its combat effectiveness was limited. Kublai Khan's army, including the army he led on the battlefield of the Southern Song Dynasty, also included the army of Tacha'er on the lianghuai battlefield, and the army that Wuliang Hetai brought back from Dali and Annam. However, because the battle was not fought smoothly, its combat effectiveness was not very strong. And Hulagu was on the battlefield of West Asia, it was a crushing division, never lost a battle, well equipped, and rich in food and grass. It can be said that if the army of the three brothers is taken to the battlefield to catch and kill, Hulagu is definitely the most powerful.
However, when Hulagu confidently marched to Hala and Lin, he stopped halfway through. Why did he stop?
(Kublai Khan)
It turned out that Ali Bu Brother and Kublai Khan had already fought. Moreover, neither of them regarded Hulagu as an opponent, and both tried to win him over. They didn't regard him as an opponent, and he naturally didn't want to raise troops to fight with them. On the battlefield, if one side hangs up the exemption card, the other side is not easy to rush to attack, not to mention that they are still brothers. This is one of them.
Second, Hulagu is actually observing and waiting. Just as the so-called "sandpipers and clams compete, and the fishermen win", Hulagu wants to be such a "fisherman".
However, the premise of "clams fighting with clams" can make "fishermen profit" is that both sides will lose. The problem is that Ali is too weak to be Kublai Khan's opponent at all. In the fight with Ali Bu Brother, Kublai Khan was not injured, but became stronger and stronger. In this way, Hulagu cannot be this "fisherman".
Moreover, Kublai Khan repeatedly sought Hulagu's help, and made a promise to Hulagu that if he could become the Great Khan, he would allow Hulagu to run the West Asia he had conquered.
In this way, Hulagu needs to make an assessment: if he starts a war with the victorious Kublai Khan, he may not be able to win; if he accepts the terms of Kublai Khan's union, he can own a large area of West Asia.
The result of the evaluation is that being the overlord of this large territory in West Asia is actually a very good choice. Therefore, Hulagu decided happily.
(References: The Secret History of Mongolia, The History of the Dosan Mongols)