James Marks, 27, of Daventry, Northants, and James McCormick, 26, of Blackpool, downloaded up to 7,000 files, including music by Beyonce.
After pleading guilty to computer misuse offences, they were given a six month sentence suspended for a year.
They were each also ordered to complete 100 hours community service.
Leicester Crown Court heard Marks and McCormick accessed thousands of files.
The hack happened in 2011 but was only confirmed by the record company last March.
The court heard there was a security flaw in the system used by Sony Music to share music with people outside the firm.
Marks and McCormick were not the first to exploit this but they used an adapted programme to speed up the process of downloading files.
The pair claimed they only wanted to gather evidence that some Jackson material released after his death didn't actually feature the singer's voice.
Sony Music has always denied that vocals on some tracks on the posthumous album 'Michael' were done by another singer.
James Marks and James McCormick also accessed unreleased tracks by JLS
In 2010 the firm paid $250m (£158m) to Michael Jackson's estate for a seven-year deal for the rights to his remaining songs.
The singer, who died in June 2009 at the age of 50, had recorded unreleased duets with artists ranging from the late Freddie Mercury to Black Eyed Peas singer will.i.am.
Online conversations between Marks and McCormick were read out in court in which they talked about selling the material, but this never came to anything.
The case was investigated by the Serious Organised Crime Agency (SOCA).
Head of cyber investigations Mick Jamieson said the men "knew exactly what they were doing, and knew the full implications".
"The internet's a fantastic tool for everyone to use, but sadly there are one or two individuals who choose to misuse it.
"The authorities are now able to to identify what you're doing, find out who you are, and come and arrest you."
Marks, 27, from Daventry, and 26-year-old McCormick, from Blackpool, admitted two counts of unauthorised access to computing materials, and were given six month jail sentences, suspended for a year.
More serious charges against the men were dropped last summer.
Speaking outside court, James Marks said he was sorry for downloading the files but was still determined to prove Michael Jackson didn't sing on some tracks on 'Michael'.