Born in Szczepanow near Kraków on July 26, 1030, he was ordained a priest after being educated in the cathedral schools of Gniezno, then capital of Poland, and at Paris. He was appointed preacher and archdeacon to the bishop of Kraków, where his eloquence and example brought about real conversion in many of his penitents, both clergy and laity. He became bishop of Kraków in 1072.
During an expedition against the Grand Duchy of Kiev, Stanislaus became involved in the political situation of Poland. Known for his outspokenness, he aimed his attacks at the evils of the peasantry and the king, especially the unjust wars and immoral acts of King Boleslaus II.
The king first excused himself, then made a show of penance, then relapsed into his old ways. Stanislaus continued his open opposition in spite of charges of treason and threats of death, finally excommunicating the king. The latter, enraged, ordered soldiers to kill the bishop. When they refused, the king killed him with his own hands.
Forced to flee to Hungary, Boleslaus supposedly spent the rest of his life as a penitent in the Benedictine abbey in Osiak.