First reign
Danylo Romanovych – son-in-law of Mstislav – refused the agreement between Mstislav and the Hungarians. He sought assistance from the dukes of Poland to enforce his aspirations to the Galician throne. Following the Battle of the Kalka River (1223), Mstislav's influence and authority had declined in the southern part of Rus'. Pro-Hungarian boyars demanded a Hungarian military intervention against Mstislav. Under duress, Mstislav was forced to transfer power to prince Andrew over Przemyśl in 1224 or 1225. Andrew II launched a campaign against Mstislav Mstislavich in late 1226 because the latter refused to grant Halych to Andrew's youngest son despite their previous compromise. The Hungarians besieged and captured Przemyśl, Terebovl, and other fortresses in Halych. However, – after Danylo and Vasylko Romanovych decided to support Mstislav – his troops were routed at Kremenets and Zvenigorod, forcing him to withdraw. Despite his victories, Mstislav ceded Halych to Andrew's namesake son in early 1227, following diplomatic negotiations. A leading pro-Hungarian boyar Sudislav administered the province on behalf of the young Andrew.
Both Leszek the White and Mstislav died by 1228, leaving Danylo to face the Hungarian rule in Halych alone. Sudislav convinced Vladimir IV Rurikovich, Grand Prince of Kiev and Mikhail Vsevolodovich, Prince of Chernigov to acknowledge Andrew's rule in Galicia. His reign was supposed to prepare the incorporation of the Orthodox Church in Galicia to the Hungarian ecclesiastical organization, but no steps were taken in this direction due to political instability. By 1230, the Romanovych brothers took control over neighboring Volhynia. Consolidating his rule and foreign relations, Danylo launched a military campaign against Andrew's territory in 1230 (the Galician–Volhynian Chronicle incorrectly put the year of attack to 1229). Besieging and capturing the capital Halych, Danylo seized Galicia by March 1230. Andrew was captured and taken prisoner, but Danylo soon released him and the young prince fled to Hungary, accompanied by Sudislav.
Sometime before 1232, there was a brief skirmish between Andrew and Coloman because of their conflicting interest in Halych. After 1221, Coloman never gave up his claim over the principality and remained in the neighboring Szepesség (today Spiš, Slovakia) for years. Only a single reference in a charter of Duke Coloman from 1232 mentions their conflict in passing. The document claims that Andrew had attacked the "realm" of Coloman led by false advisers. It is unlikely that Andrew invaded Slavonia, which Coloman governed after 1226, because of the geographical distance and Andrew's constantly difficult situation in Halych. As Slovak historian Nataša Procházková considered Andrew invaded Coloman's lands in Szepesség sometime between 1222 and 1226, and only a brief skirmish occurred between them. Historian Attila Zsoldos considered the confrontation took place in the first half of 1231, after Andrew was driven from Halych (see below). Zsoldos argued the skirmish was part of wider conflict between Andrew II and his elder sons, Béla and Coloman, who strongly opposed his economic reforms and internal policy. Robert, Archbishop of Esztergom mediated the peace in the dynastic conflict.