“I just heard the news about today’s terror attack in London and I just wanted to pass on my thoughts and condolences to the victims and the victims’ families,” he said.
“I also wanted to remind everyone that terror is a weapon that is only effective if we allow it to be. Stay brave Britain.”
Cavill captioned the post with the hashtags #United and #StayBraveBritain.
Four people died during the attack on Westminster on Wednesday afternoon.
A man wielding two knives was shot and killed after fatally stabbing Pc Keith Palmer outside the Palace of Westminster.
Aysha Frade, a 43-year-old mother of two originally from Spain who lived in London, and US tourist Kurt Cochran were also killed when the attacker mowed down pedestrians with a 4x4 Hyundai car on Westminster Bridge.
A host of celebrities have paid tribute, including Adele, who dedicated her song Make You Feel My Love to the victims during her concert in New Zealand.
“Today there was a terror attack in my hometown of London,” she told the 50,000 strong-crowd. “I'm literally on the other side of the world and I want them to see our lights and to hear us.
“It's very strange not being home, all I want to do today is be at home with my friends and family.
“All of them are fine but there are four people who aren't fine so let's dedicate this to them tonight.”
Speaking to viewers on Wednesday night he said: “Watching the news today, I felt a really long, long way from home.
“When something like that happens in your hometown, you don't have a feeling of being glad that you're so far away, what you feel is that you wish you could be there with loved ones to stand alongside them.
“Tonight, we send our heartfelt thoughts to everybody in Britain. Stay safe.”