The 29-year-old Murray, who is yet to drop a set this week, sealed victory in one hour 31 minutes, his seventh successive win over fifth seed Ferrer.
The big-serving Raonic was forced to play twice on Friday, beating Tunisia's Malek Jaziri and Pablo Carreno Busta to advance to the last four and he sustained the injury during the win over the Spaniard.
"Yesterday during my second match in the evening, I rolled over my ankle, obviously caused it some level of a sprain," the Canadian told the ATP website.
Wimbledon
Murray to warm-up for Wimbledon at Surbiton and Queen’s
18/05/2022 AT 10:13
"I did a test this morning, which showed I had a partial tear on the outside of my ankle. I was told to give it a try. I tried to warm up just before the match like I would normally, and I was unable to play."
Murray, through to the China Open final for the first time, has enjoyed one of the best years of his career, winning Wimbledon and the Olympic gold medal. World number one Novak Djokovic pulled out of the tournament due to injury.
Britain's Johanna Konta had earlier reached the women's final.
Roland-Garros
French Open 2022: Who's playing? Who could miss out? Will Nadal be fit?
16/05/2022 AT 11:48
Roland-Garros
Murray 'withdraws from French Open to focus on Wimbledon' - reports
15/05/2022 AT 18:29