Former state Labor mining minister Ian Macdonald favoured the interests of a "mate" above the interests of the state when he granted a coal licence worth millions to a company chaired by former union boss John Maitland, a court has heard.

On Monday the two men sat at opposite ends of a spacious wooden dock as their criminal trial started in the Supreme Court in Darlinghurst.

Ian Macdonald outside Darlinghurst Supreme Court on the first day of his criminal trial. Credit:Ben Rushton

Mr Macdonald is charged with two counts of misconduct in public office for inviting private company Doyles Creek Mining to apply for, and later granting it, a lucrative coal exploration licence without a competitive tender.

Doyles Creek Mining was chaired by Mr Maitland, a former national secretary of the Construction, Forestry, Mining and Energy Union. He is facing two counts of being an accessory before the fact.