The 29-year-old, Lewis Hamilton who won his second Formula 1 world title this season joined an exclusive club by becoming the fourth Briton to win the drivers’ championship at least twice.
The Mercedes driver won 209,920 of the 620,932 votes cast, with Northern Irish golfer McIlroy getting 123,745 (20%) as runner-up and athlete Jo Pavey 99,913 (16%) third.
“I was sitting there saying Rory’s going to have it,” said Hamilton, who earned 34% of the vote. “I thought it had to be someone else.”
“I want to say a huge thank you to all the people who called in, I really wasn’t expecting it,” he added.
“I am so speechless. I’m so proud and honoured to be among such great sporting talent.”
Hamilton was runner-up to boxer Joe Calzaghe in 2007 and Sir Chris Hoy the following year.
Meanwhile, Real Madrid and Portugal forward Cristiano Ronaldo wins the BBC’s 2014 Overseas Sports Personality award. The 29-year-old former Manchester United star was named world player of the year 11 months ago.
Ronaldo has scored 32 goals in 23 games this season, and 281 goals in 267 matches for Real Madrid, including 27 hat-tricks.
The other winners were:
• Young Sports Personality of the Year: Claudia Fragapane. The 17-year-old gymnast became the first British woman in 84 years to win four gold medals at one Commonwealth Games.
• Lifetime Achievement Award: Six-time Olympic gold medal-winner Sir Chris Hoy was honoured in his home country.
• Helen Rollason Award: The Invictus Games competitors were presented with the trophy by Prince Harry.
• Sport’s Unsung Hero: Jill Stidever won the award after spending nearly 60 years teaching thousands of children with special needs to swim.
Last 10 winners
2013: Andy Murray (tennis) 2012: Sir Bradley Wiggins (cycling)
2011: Mark Cavendish (cycling) 2010: AP McCoy (horse racing)
2009: Ryan Giggs (football) 2008: Sir Chris Hoy (cycling)
2007: Joe Calzaghe (boxing) 2006: Zara Phillips (equestrian)
2005: Andrew Flintoff (cricket) 2004: Dame Kelly Holmes (athletics)