As far as i could find out, the first time slavery was officially abolished in Hungary was in 1852 with the introduction of the "Allgemeines Bürgerliches Gesetzbuch" (ABGB / General civil code), which explicitly forbid slavery and serfdom. The civil code was introduced to the Habsburg crownlands in 1812 and introduced in Hungary from 1852 (in the wake of the "New Year's Eve patent"/Silvesterpatent of 1851) to 1861.
Serfdom alone was already temporarily de jure abolished through the Hungarian revolution of 1848. It's not clear to me whether this would also include slavery.
Regarding slavery in the medieval kingdom of Hungary, I found a source in a book by Lajos Tardy, translated into German by Esterházy named "Sklavenhandel in der Tartarei" from 1983. It describes slavery in the Crimea and Tartary, while giving context regarding Hungary and Hungarian slaves until the 1470s. Because I could not find an English translation, the following summary is translated by myself:
According to Tardy, taking and selling slaves (to Byzantine Merchants in Kerch) was common for the Magyars (p.82). Following the settlement of the Magyars on the Hungarian plain, enslavement of local Slavs was likewise common.
Following on after the settlement and christianiazion of Hungary, a distinction was made between christian and non-christian slaves (Jewish people were also considered somewhat protected following the Synod of Szabolcs). Tardy quotes Simon Kézai, a Hungarian chronicler of the 13th century who wrote, that it was the right of every Hungarian to hold heathen slaves. The number of slaves in the 13th century rose further, as children of slaves were considered slaves, the court of law could force you into becoming a slave (e.g. for unpaid debts) or prisoners of war could become slaves (p. 85-86).
Especially Genoese and Venetian colonies and associated slavemarkets in the Crimea further boosted the slave-trade (in cooperation with the Golden Horde) at the end of the 13th century,and consequently the supply inside Hungary. Hungarians were themselves among some of the sold slave population. Much of the comparatively smaller overland trade between the Black Sea, northern Italy and other European markets also crossed Hungary. Until the collapse of the Italian colonies in the Black Sea (~1470), slavery continued with notable spikes e.g. following the Black Death (1348-52) and the associated labor shortages (p.102).
For an online source regarding Tardys book (in German), see e.g. https://scholar.google.com/scholar_lookup?&title=Sklavenhandel%20in%20der%20Tartarei%3A%20Die%20Frage%20der%20Mandscharen&publication_year=1983&author=Tardy%2CLajos
Following the conquests of the Ottomans, Hungarians often became slaves themselves, e.g. through the Devshirme child-levy. According to Wikipedia about one fifth of the population of the Empire were slaves in the 16th and 17th century.