The Tarnowski family was one of the oldest and most powerful magnate families in Poland. The family reached its apex in the 14th, 15th and the 16th centuries, when members of the Tarnów, Melsztyn and later from Jarosław branches held prominent positions beside the Piast and Jagiellon kings of Poland. From father to son, the Tarnowski family held ten times the office of voivode of Kraków Voivodeship and six times the office of castellan of Kraków.
The history of the family started with the trusted advisor of the last Piast kings Comes Spytek z Melsztyna, the progenitor of the Tarnowski-Melsztyński-Jarosławski family. By 1320 he held the office of voivode of Krakow, and from 1331 the highest secular office in the Kingdom of Poland, castellan of Krakow. For his military service, King Władysław I the Elbow-high gave him large estates on the Dunajec river, where Spytek founded the city of Tarnow in 1330 and built two stronghold castles in Tarnow and Melsztyn around 1340.
After the death of Spytek, the castle of Melsztyn was inherited by his son Jan z Melsztyna, who like his father was from 1360 voivode and castellan of Kraków. His younger brother, the castellan of Wiślica Rafał z Tarnowa, became the owner of Tarnow. Rafał expanded his estates, adding land in Sandomierz, Wielowieś and Dzików.
The son of Jan z Melsztyna, Spytek z Melsztyna, was the next owner of Melsztyn. He was voivode of Krakow, Feudal Lord of Podolia, and hero of the 1399 battle of Worskla. Rafał's son Jan z Tarnowa was appointed General Starost of Ruthenia, and both voivode and castellan of Kraków.
The Tarnowski-Melsztyński family achieved the highest offices in the country as well as extraordinary wealth and huge feudal estates, including land in Jarosław, Sambor, and Podole etc. Their most significant role in the history of Poland was organise the union of Queen Jadwiga and Władysław II Jagiełło and to initiate their coronation.
After the death of Spytek z Melsztyna and the death of his son, who was also named Spytek z Melsztyna, in the 1439 battle of Grotniki, the Melsztyn line declined. In the Tarnów line, the sons of Jan z Tarnowa fought in the Battle of Grunwald in 1410 and after that divided the family property. Jan the voivode of Kraków Voivodeship settled in Tarnów, and the voivode of Sandomierz Voivodeship Spytek became the owner of Jarosław, where he started a new branch of the family, called the "Leliwita branch".
Jan z Tarnowa had five sons, of which Jan Amor Starszy Tarnowski and Jan Gratus Tarnowski together with their cousin, Spytek z Jarosławia, died with King Władysław III of Poland in the 1444 Battle of Varna. His third son Jan Rafał Tarnowski became a priest and the last two, Jan Feliks Tarnowski became voivode of Lublin Voivodeship, while Jan Amor Młodszy Tarnowski inherited Tarnów and was appointed voivode of Kraków, and in 1490 castellan of Kraków.