He was participant in the Hungarian Revolution of 1848 and the January Uprising, tenant of landed estates (including Bieńczyce), and teacher at an agricultural school in Czernichów.
During the Spring of Nations, he was involved in conspiratorial activities and, fearing arrest, moved to Hungary, where he took part in battles against the Austrian army.
He was the second child of Franciszek Ksawery Matejko (1793–1860), a Czech immigrant from the Hradec Králové area, and his wife Joanna Rosberg (1802–1845), the daughter of a German saddler who had settled in Kraków.
[6] The Matejko brothers joined the unit of Hipolit Kuczyński, initially part of the German legion stationed in Dolný Kubín, under the command of Major Ármin Görgey.
The Hungarian commander, operating in the regions of the Árva and Turóc counties, received orders from Józef Wysocki to send this unit to him to be incorporated into the Polish Legion.
[c][7][8] During the campaign, the brothers fought in the battles of Bánffyhunyad, over the Váh river, and at Martin, where Zygmunt died in the spring of 1849.
[1][9] After the failure of the Hungarian Revolution, he tried to return to Galicia but was captured by the Austrians while attempting to cross into those territories[1] or possibly in Kraków itself.
He found employment on the estate of Dezydery Chłapowski in Turew but, harassed by the Prussian police, he decided to leave Polish lands.
[g] Following the defeat, he returned to Kraków on May 7, where he was arrested for his involvement in the skirmish at Szklary and imprisoned at the Wawel Castle, then part of the Austrian fortress.
[17] According to Marian Gorzkowski [pl], the painter's secretary, Edmund and their eldest sibling, Franciszek, taught Jan to read.
[4][17][19] Letters from Edmund during his time abroad, describing Paris and its art galleries, reportedly inspired the young artist's desire to visit the city.
In November of the same year,[h] when Jan was purchasing a house on Floriańska Street from his siblings, Edmund resisted and negotiated grudgingly, making snide remarks toward his brother.
[22] This did not sever their relationship; in 1876, when Jan purchased an estate in Krzesławice, its proximity to Edmund's leased land in Bieńczyce influenced the decision.
[12][26][27] Later, he posed for his brother as Jan Žižka in Battle of Grunwald and as a figure in the painting Wacław Wilczek Defending the Church in Trzebów.