Malachowski threw 67.55m to claim silver, finishing 82cm adrift of Germany’s Christoph Harting who took gold.
It was the 33-year-old’s second Olympic medal having taken silver back in 2008 at Beijing.
His donation enabled compatriot Olek Szymanski, who has retinoblastoma (an eye cancer affecting young children), to fly to New York to undergo treatment.
"My silver medal is worth a lot more than a week ago," said Malachowski.
"It is worth the health of little Olek."
He added: "We were able to show that together we can do wonders. It is our great shared success.