Probably borrowed from Old Polish Maciej; from the Latin masculine name Matthias (“gift of God”).
Macius ?