Set in southern Hungary in mid-18th century.
Sandor Barinkay, a young Hungarian nobleman, comes back home after years of vagrancy. Conte Carnero, Royal Commissioner for Oaths from Vienna, reinstates the title to Barinkay’s family property. Barinkay’s father lost his land after being suspected of co-operation with the Turks. The land is neglected and the castle is falling into ruin. Part of the property is occupied by the pig breeder, Kalman Zsupán. The new successor is welcomed by the Gypsy Czipra, telling Sandor fortune of richness and love.
The neighbour Zsupán, who does not want to lose his farm, decides to make his daughter Arsena marry Barinkay. However, the girl falls in love rather with Ottakar, a son of her governess, Mirabella. The young couple hide their love away, since Arsena knows that her father will never let her marry the poor Ottakar. However, Zsupán wants his plan to come true and invites everybody to his home. During the meeting, people find that Mirabella is the wife of Carnero. Mirabella went missing years before during the war, and Ottakar is their son. At that time, Arsena received the new suitor with reservation, promising to give himher hand when he wins the title of Baron. When Barinkay leaves Zsupán’s home, he meets a young Gypsy girl Saffi singing a song known to himfromhis childhood. Together with Czipra and Saffi, Sandor Barinkay witnesses a night date of Arsena and Ottakar. Offended by Arsena’s betrayal, Sandor accepts the friendship of the Gypsies camping on his land. He agrees to become a Gypsy Baron. His intention has been fulfilled: holding that title, he knocks at Zsupán’s door again and asserts his noble right of the hand of Arsena. Arsena, however, rejects the proposal. Then, Sandor announces his engagement to Saffi. The crowd considers that change abusive for Arsena, and threatens with reprisals. Only Saffi, surprised with this turn of events, is very happy.
Owing to Czipra’s „magic skills,” Barinkay finds a legendary Turkish treasury. Zsupán comes to the Gypsy camp, dragging bags with silver. He wants to buy out Barinkay’s land but is denied that. Carnero, now Zsupán’s supporter, plans to confiscate the treasure when Count Homonay arrives with a detachment of Hussars to recruit volunteers to fight in the war against Spain.
Barinkay volunteers to join the Hussars and donate the treasure to the army. Zsupán also goes to the army, and his sacs are confiscated.
Count Homonay orders that the ladies should wait for their fathers and husbands in safe Vienna. Arsena and her governess, Mrs. Carnero, do not want to travel together with Saffi, a „Gypsy vagabond.” Czipra reveals then that Saffi is not really her daughter but the child of the last Pasha of Hungary, a real Princess, which is confirmed by Count Homonay. By kissing her hand, the Count recognizes Saffi’s right to the title. Now, Barinkay feels inferior to Saffi’s position. He leaves with the Hussars depressed.
Two years later, the soldiers come back from the war. They are awaited by Saffi with Mirabella, Carnero, Arsena and their friends. The first to appear is Zsupán. As a reward for his service, he becomes a life supplier of pork to the army. Ottakar, now a son of Carnero, receives Arsena’s hand. The heroic deeds of Barinkay are rewarded with the title of the Baron, reinstatement of the property, a medal and the hand of loving Saffi.