The 58-year-old attacker was detained by guards at the monastery holding the revered depiction of Mary and the baby Jesus in the southern city of Czestochowa, police said.
"The icon is shielded by a protective plate of glass and was unharmed," Czestochowa police spokeswoman Joanna Lazar added.
It was unclear why the man carried out the attack or whether the paint cans were open.
A statement on the Jasna Gora monastery website said the attacker had tried to deface the icon with a "black substance".
The monastery became a symbol of national pride after Poles successfully defended it against invading Swedish troops in the 17th century.
According to legend, the sacred image was painted by St Luke and helped repel the foreign soldiers.