Former NSW Labor MP Ian Macdonald has been sentenced to up to 10 years’ jail for wilful misconduct in public office.

Mr Macdonald will now join his former colleague Eddie Obeid behind bars after an extensive investigation by the Independent Commission Against Corruption (ICAC) found him guilty of two counts of misconduct in public office.

Mr Macdonald was found guilty of granted a multi-million-dollar coal licence “without any reasonable cause or justification” to Doyles Creek Mining, when he was NSW’s mineral resources minister in 2008.

John Maitland, chair of Doyle’s Creek Mining and a former union boss, was also jailed for at least four years for being an accessory to the misconduct.

ICAC investigations from 2012 to 2013 found Mr Macdonald granted the coal exploration licence as a favour to Maitland.

Mr Macdonald was also found to have spent time with an escort named Tiffanie as a reward for setting up meetings with executives from Country Energy and Energy Australia.

ICAC also looked at claims that Mr Macdonald favoured Mr Obeid and his associates in opening the Bylong Valley - where the Obeid family owned property - to coal mining exploration.

Obeid and Macdonald have been ordered to stand trial over the licence.

They are scheduled to be arraigned in the District Court on June 9.