World heavyweight boxing champion Anthony Joshua had been hotly tipped to win the prize.
The 34-year-old adds the SPOTY award to his already considerable haul of four Olympic gold medals across the last two competitions in 2012 and 2016, and his six gold world championship medals.
Farah claimed the 10,000m crown at the 2017 World Championships in athletics.
It will be a three-day task that will include creating a brand and advert as well as the final business pitch that will help Lord Sugar decide who will be his new business partner.
The long-distance runner, who will now focus on marathon running after starring in successive Olympics, took the award ahead of motorcycle racer Jonathan Rea, who was the runner-up, and paralympic sprinter Jonnie Peacock, who came third.
"You look at this year and Jonnie Peacock, Anthony Joshua, Lewis Hamilton, it's been incredible. I honestly thought I wasn't going to win it", he told BBC Radio 5 Live.
Elsewhere during the evening Dame Jessica Ennis-Hill was given the Lifetime Achievement Award with Roger Federer taking the Overseas Sports Personality of the Year award for a record fourth time.
"Thank you to everyone that voted for me, I'm just sorry I can't be there to celebrate".